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

Fixes #26374 - use proxy code for authorization #59

Closed
wants to merge 2 commits into from

Conversation

iNecas
Copy link
Member

@iNecas iNecas commented Mar 15, 2019

Also, I've made the core authorization code a bit more defensive:
I've noticed that Puma is setting 'https' in ENV['HTTPS']: if we don't
check that we should use https, we would be letting the requests though
even if we shouldn't. Luckily, we're not running Puma just yet, but it's
good to be prepared, so we're actually also checking whether we really
are not using https. Also, just the presence of ENV['HTTPS'] is now
enough to assume we are in the SSL mode.

Also, I've made the core authorization code a bit more defensive:
I've noticed that Puma is setting 'https' in `ENV['HTTPS']`: if we don't
check that we should use https, we would be letting the requests though
even if we shouldn't. Luckily, we're not running Puma just yet, but it's
good to be prepared.
I don't remember last time it actually was useful.
@@ -86,7 +86,7 @@ Style/Next:
Enabled: false

Metrics/AbcSize:
Max: 30
Enabled: false
Copy link
Member Author

Choose a reason for hiding this comment

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

Inspired by theforeman/smart-proxy@21642e6, I don't remember last time the AbcSize metric was of any use for me.

@adamruzicka
Copy link
Contributor

A lot has changed since this PR was opened and it isn't really needed anymore so I'll go ahead and close it. Thank you @iNecas

@adamruzicka adamruzicka closed this Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants