diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2020-10-07 08:10:50 +0300 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2020-10-07 08:10:50 +0300 |
commit | 21ba95871e6196f6340cee4b1ce3384931c0a000 (patch) | |
tree | 4bf183430114f4cf032bacc41b86fc41200a5577 /internal/serving/disk | |
parent | 2971b8b92c67a2f647c6c8d4ecd6da7360cea72a (diff) |
Enable redirects by default24-redirects-by-default
- Part of https://gitlab.com/gitlab-org/gitlab-pages/-/issues/24
- Original feature added in https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/336
- Feature was verified working in in production: https://ops.gitlab.net/gitlab-cookbooks/chef-repo/-/merge_requests/4247#note_92527
- Feature toggle docs being removed in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42759
Diffstat (limited to 'internal/serving/disk')
-rw-r--r-- | internal/serving/disk/reader.go | 2 | ||||
-rw-r--r-- | internal/serving/disk/serving.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/serving/disk/reader.go b/internal/serving/disk/reader.go index 559d332c..6afe7947 100644 --- a/internal/serving/disk/reader.go +++ b/internal/serving/disk/reader.go @@ -95,7 +95,7 @@ func (reader *Reader) tryFile(h serving.Handler) error { // Serve status of `_redirects` under `_redirects` // We check if the final resolved path is `_redirects` after symlink traversal if fullPath == redirects.ConfigFile { - if os.Getenv("FF_ENABLE_REDIRECTS") == "true" { + if os.Getenv("FF_ENABLE_REDIRECTS") != "false" { r := redirects.ParseRedirects(ctx, root) return reader.serveRedirectsStatus(h, r) } diff --git a/internal/serving/disk/serving.go b/internal/serving/disk/serving.go index bb9b40d2..11b1689e 100644 --- a/internal/serving/disk/serving.go +++ b/internal/serving/disk/serving.go @@ -21,7 +21,7 @@ func (s *Disk) ServeFileHTTP(h serving.Handler) bool { return true } - if os.Getenv("FF_ENABLE_REDIRECTS") == "true" { + if os.Getenv("FF_ENABLE_REDIRECTS") != "false" { if s.reader.tryRedirects(h) == nil { return true } |