Skip to content
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

rack.url_scheme is being set incorrectly on Heroku #86

Open
jellybob opened this issue Nov 11, 2019 · 3 comments
Open

rack.url_scheme is being set incorrectly on Heroku #86

jellybob opened this issue Nov 11, 2019 · 3 comments

Comments

@jellybob
Copy link

We're attempting to migrate our Heroku hosted application to Falcon, but hitting an issue where rack.url_scheme in the request environment seems to be incorrectly set to http rather than https - this causes all requests to be intercepted by some middleware and throws us into an infinite loop of responses with a 307 status code redirecting to the SSL version of the URL.

The attached screenshot shows the interpreted protocol - the purple line indicates HTTPS, while the orange one is HTTP. As you can see when we deployed Falcon into our staging environment the protocol switched for all requests, and then returns to HTTPS when we deploy with Puma instead.

Screenshot

Monitoring is being done via Honeycomb, using their rack-honeycomb gem - the specific line in question can be found here, which indicates somewhere in Falcon's HTTP stack the URL scheme is not being set.

@ioquatix
Copy link
Member

thanks for your report I will investigate.

@jellybob
Copy link
Author

Its probably not the cleanest possible fix, but I think I've tracked down the source and will submit a PR once I've tidied it up a bit.

@ioquatix
Copy link
Member

Awesome, I will review it in the next day or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants