-
Notifications
You must be signed in to change notification settings - Fork 547
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
Nginx passenger_env_var
falsifying values
#2419
Comments
I am able to reproduce this with the example app. I can also change the variables to
To clarify these are environment variables and not http headers (but rack will merge them in the environment). And the last one will become You can also change the example app to simply raise an exception in the config.ru so passenger does not even start. In the subprocess diagnostics you can also clearly see how the environment variable value swapped some characters around. I was strangely not able to reproduce this with rails, maybe due to to there being many more environment variables so the error is harder to spot. |
Sounds very similar to an issue I ran into with Apache environment variables. I ended up needing to stop using the feature. Mine was also using arm (locally and in AWS). |
Thank you! |
Issue report
Question 1: What is the problem?
When using the nginx module of passenger the option
passenger_env_var
inside server configs is falsifying values for the headers sent to the application.For example this:
generates the following headers in the application:
It seems to be only the last one declared having this issue.
Also I was only able to reproduce this issue on my new ARM based Macbook.
On my older Intel based machine it was working fine.
Question 2: Passenger version and integration mode:
I'm using latest versions of both nginx + passenger currently available via homebrew:
Question 3: OS or Linux distro, platform (including version):
I've been able to reproduce on MacOS 12.3.1 (ARM) but not on 10.15.7 (Intel)
Question 4: Passenger installation method:
OS X Homebrew
Question 5: Your app's programming language (including any version managers) and framework (including versions):
Ruby 3.1.1 (RVM) / Rack 2.2.3
Question 6: Are you using a PaaS and/or containerization? If so which one?
Only tested on local machines.
Question 7: Anything else about your setup that we should know?
I've created a small repo with minimal setup that can be used to reproduce:
https://github.com/klausmeyer/nginx-passenger-issue
The text was updated successfully, but these errors were encountered: