Resolve "Gitlab Pages access control issues a redirect to HTTP even though external URL is set to HTTPS"
requested to merge 242-gitlab-pages-access-control-issues-a-redirect-to-http-even-though-external-url-is-set-to-https into master
See #242 (closed)
We can't rely on r.TLS
when pages are served behind proxy.
So we save https
flag to a context for later usage.
Right now I'm trying to keep changes to a minimum since I'm planning to backport this to older versions. That's why https flag is not refactored throughout the codebase.
The alternative way would be to use gorilla's proxy headers. I'm planning to refactor to that version later
The context part is taken from !157 (diffs)
Edited by Vladimir Shushlin