Skip to content

Obtain allowed origin list from the environment #2659

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

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

jtgeibel
Copy link
Member

This adapts the scheme added in #2627. When operating behind
CloudFront, the Host received by nginx is the Heroku instance and does
not match the user facing crates.io origin. Therefore it is necessary to
obtain a list of allowed origins at boot time.

If this header is not set, the server will panic and will not boot.

r? @JohnTitor
cc @jsha

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks good! r=me once CI is happy with code style and testing on staging is fine.

Copy link
Contributor

@jsha jsha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - sorry I didn't realize there would be an origin mismatch in prod!

This adapts the scheme added in rust-lang#2627. When operating behind
CloudFront, the Host received by nginx is the Heroku instance and does
not match the user facing crates.io origin. Therefore it is necessary to
obtain a list of allowed origins at boot time.

If this header is not set, the server will panic and will not boot.
@jtgeibel jtgeibel force-pushed the update-origin-check branch from cd9ef24 to a7a2256 Compare July 27, 2020 03:34
@jtgeibel
Copy link
Member Author

No worries, I didn't either! I plan to redeploy sometime tomorrow morning (EDT).

@bors r+

@bors
Copy link
Contributor

bors commented Jul 27, 2020

📌 Commit a7a2256 has been approved by jtgeibel

@bors
Copy link
Contributor

bors commented Jul 27, 2020

⌛ Testing commit a7a2256 with merge 62e74f7...

@bors
Copy link
Contributor

bors commented Jul 27, 2020

☀️ Test successful - checks-travis
Approved by: jtgeibel
Pushing 62e74f7 to master...

@bors bors merged commit 62e74f7 into rust-lang:master Jul 27, 2020
@jtgeibel jtgeibel deleted the update-origin-check branch July 27, 2020 03:54
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 this pull request may close these issues.

5 participants