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

Substring Environment Variables Overwrite Others #118

Open
bwolfe opened this issue May 20, 2021 · 0 comments
Open

Substring Environment Variables Overwrite Others #118

bwolfe opened this issue May 20, 2021 · 0 comments

Comments

@bwolfe
Copy link

bwolfe commented May 20, 2021

Seems that env vars that are substrings of a subsequent env var are overwriting the later variable.

If I use this in my tests:
env_to_nginx("COOKIE_SECRET=secret", "COOKIE_SECRET_ALT=alt");
then the "COOKIE_SECRET_ALT" value is "secret" in the code.

If I reverse the order to:
env_to_nginx("COOKIE_SECRET_ALT=alt", "COOKIE_SECRET=secret");
then it works as expected in the code. (So I do have a workaround, this is a minor inconvenience that wasted a few hours of my day)

This also happens if I put them as "env" directives in a main_config override section of the test.

This does NOT happen outside of tests when running the app. The env vars can be in any order and still work.

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

No branches or pull requests

1 participant