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
Merge request reports
Activity
changed milestone to %8.17
Hmm, this does invert the meaning of a flag, but I agree that this way around makes a lot more sense than the other.
It breaks the acceptance tests, though. Could I get you to fix them, and perhaps add another covering the flag's new behaviour? I'm happy to get onto it Monday if you don't have time!
@stanhu ^
/cc @ayufan
Hmm, this does invert the meaning of a flag, but I agree that this way around makes a lot more sense than the other.
Yes, plus the meaning of the flag was broken then: it would ALWAYS redirect a HTTPS query to HTTPS, causing infinite redirects.
It breaks the acceptance tests, though. Could I get you to fix them, and perhaps add another covering the flag's new behaviour? I'm happy to get onto it Monday if you don't have time!
Please take it on Monday if you don't see any progress here over the weekend. Thanks!Done!Edited by Stan Huadded 1 commit
- 8c664f2d - Use a RoundTrip to avoid Go 1.7-specific implementation
mentioned in issue gitlab-com/infrastructure#1319 (closed)
added 1 commit
- fcdb39a4 - Get acceptance tests for -redirect-http=false|true passing
- Resolved by Nick Thomas
mentioned in issue #54 (closed)
mentioned in issue #55
mentioned in commit fabfff48
mentioned in issue #46 (closed)
mentioned in issue #38 (closed)
@zj can you show me the command line?
It needs to be
-redirect-http=false
.-redirect-http false
enables the redirect, which is fun.$ ps aux | grep gitlab-pages /opt/gitlab/embedded/bin/gitlab-pages -listen-proxy=localhost:8090 -daemon-uid=998 -daemon-gid=998 -pages-domain=pages.zjvandeweg.nl -pages-root=/var/opt/gitlab/gitlab-rails/shared/pages -redirect-http=true -use-http2=true
So this is wrong in omnibus, sorry for disturbing you. Didn't have the time yesterday to dig into this.