-
Notifications
You must be signed in to change notification settings - Fork 2
Redirect http > https #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
I ran a couple of test scenarios in Now that I'm thinking about it a bit more, that is probably because mailcatcher is not part of the HaProxy load balancing act. |
MKodde
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not feel like the most apparent reviewer, but I did test the core and stepup environments with your new addition to the HaProxy config. And that worked really well!
See some questions/remarks below.
| - ../core/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro | ||
| - ../core/haproxy/backends.map:/usr/local/etc/haproxy/backends.map:ro |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand why these new volumes are required, dev leftover?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the haproxy service that is the actual haproxy in stepup. So without this, it will not use the config files.
| http-request set-header X-Forwarded-Proto https | ||
|
|
||
| http-request redirect scheme https code 301 if !{ ssl_fc } | ||
| http-request set-header X-Forwarded-Proto https if { ssl_fc } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
In order to prevent duplicate configurations, refer to the core config in stepup. `option forwarded` produced an error (haproxy would not start), so changed to `forwardfor`
41619c7 to
b957d55
Compare
I lost much time tracing error messages before discovering the login flow started on http instead of https.
In order to prevent these issues in the future, ensure all requests use https. (except for the mailcatcher, which is not routed through haproxy).
In order to prevent duplicate configurations, the haproxy config from core is linked into stepup, as that specific config also has all stepup projects mapped.