Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 #25293 - Puma support for smart proxy #623
Fixes #25293 - Puma support for smart proxy #623
Changes from all commits
f7787f9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 EL7 systems with Ruby 2.0.0 where IPv6 was disabled in the kernel I've seen it fail to listen on
::
. That's why we have a workaround in the installer. Could you verify this won't be an issue?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.
Indeed it does not work, however I can hardly do anything about it in the code because the exception is "Bad URI":
I guess on non-IPv6 systems users must not use '*'.
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 surprises me, but I've verified that on Fedora 31 with Ruby 2.6.5-p114 that binding to
*
only binds to0.0.0.0
and thus breaking IPv6. https://stackoverflow.com/questions/20657650/socket-listener-for-ipv6-and-ipv4 suggests you should bind to both for cross platform support. On Linux it can also be changed via thenet.ipv6.bindv6only
sysctl in which case::
only binds to IPv6. Any idea how Windows behaves?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.
IMHO this should look at the server in use and only test for that specific variable.
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 don't see any security threat, this way it can be a simple helper.
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.
When using Puma and providing a header named
SSL_CLIENT_CERT
, can you guarantee it won't end up in the env? I'd rather be safe than sorry and only check for what is known to be expected.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.
When is an env var not a string?
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.
When it's variable ;) Not apologizing for my bad joke :P
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 later noticed that the
.to_s
was already there in the previous code as well.