Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-03-11 02:21:21 +0300
committerNick Thomas <nick@gitlab.com>2017-03-13 13:42:29 +0300
commitde395b2806024af3846c93b3f10c9dc9416cd83d (patch)
tree56a4f2154dbda3314548f2101bbc47c1984bd56b /app.go
parentfbcbce1277c57783568c2a2d828c0022d675932c (diff)
Fix and clarify redirect HTTP logic
redirect-http seemed to suggest the Pages daemon would redirect from HTTPS to HTTP, but it seems that the opposite was implied. Fixes issue manifested by https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/1348
Diffstat (limited to 'app.go')
-rw-r--r--app.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/app.go b/app.go
index 4ef5e730..351441d0 100644
--- a/app.go
+++ b/app.go
@@ -52,7 +52,7 @@ func (a *theApp) serveContent(ww http.ResponseWriter, r *http.Request, https boo
defer metrics.SessionsActive.Dec()
// Add auto redirect
- if https && !a.RedirectHTTP {
+ if !https && a.RedirectHTTP {
u := *r.URL
u.Scheme = "https"
u.Host = r.Host