You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
server {
location / {
proxy_set_header X-Real-IP $external_ip;
}
}
Reason for change
for instance, in a reverse proxy setup, if I need to set a secret which needs be passed in a request to the backend,
I'd like to set its value in the container env variables, instead of writing it in the nginx config directly.
proxy_set_header X-Api-Key $mysecret;
Proposed code change
No response
The text was updated successfully, but these errors were encountered:
Is this a new feature request?
Wanted change
hello, would it be possible to use values set in environment variables inside nginx config? the official nginx container allows this by using templates: https://github.com/nginxinc/docker-nginx/blob/master/entrypoint/20-envsubst-on-templates.sh
for reference, this solution uses such feature:
https://serverfault.com/questions/577370/how-can-i-use-environment-variables-in-nginx-conf
docker-compose.yml:
template-variables:
nginx.conf:
Reason for change
for instance, in a reverse proxy setup, if I need to set a secret which needs be passed in a request to the backend,
I'd like to set its value in the container env variables, instead of writing it in the nginx config directly.
proxy_set_header X-Api-Key $mysecret;
Proposed code change
No response
The text was updated successfully, but these errors were encountered: