-
Notifications
You must be signed in to change notification settings - Fork 2
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
Occasional insecure redirect from https to http #354
Comments
Note for refinement: as well as fixing this, how can we set up an alert to check this doesn't reoccur? |
Had to go on a bit of a detour here to get the CloudFront logs sent through to CloudWatch Logs. With that resolved, I don't unfortunately have enough information from the logs as to why there's a redirect to a URL using the http scheme instead of https. I believe the best next step will be to add some logging to the main application which prints the incoming headers. I'd also like logging on redirect responses so we can see whether the Location header is correctly set by the application. I'd also like to know whether the X-Forwarded-For headers are coming through from CloudFront. My suspicion is that the gunicorn/Fast API application might not be respecting those headers when generating redirect responses. I note that there is some configuration which can be added to help influence this behaviour: https://www.uvicorn.org/settings/#http Specifically, the addition of However, until we have logs to prove the current situation, there's no point in trying to make configuration changes. Would you be happy @Ben-Hodgkiss for a ticket to pick up the additional logging on the main application? |
@cpcundill - thanks for doing the research. This sounds sensible I think! Would you be able to add the ticket as a sub-issue of this one so we can then implement that and subsequently keep an eye out for URLs redirecting to http going forward. We can then keep this ticket open and check the logs after a week or so to see if we can find any evidence of it. |
@Ben-Hodgkiss - Added the sub-issue which is probably best for a developer to pick up. |
I'm occasionally redirected from a https page to a http URL.
This happens infrequently, since launch and looks like an issue with our cloudfront configuration.
takes me to:
The text was updated successfully, but these errors were encountered: