I want to add
proxy_set_header X-Forwarded-Proto: https;
(in order to make an application work with ssl / varnish without redirect loops.
When inserted manually like so
everything works a treat.
Is there a way to add this to Additional nginx directives ? I know I could create a custom template but I want to apply this on a per domain basis not globally..
proxy_set_header X-Forwarded-Proto: https;
(in order to make an application work with ssl / varnish without redirect loops.
When inserted manually like so
Code:
#extension docker begin
location ~ ^/.* {
proxy_pass http://0.0.0.0:32780;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto: https;
}
#extension docker end
location / {
proxy_pass http://78.129.161.190:7080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto: https;
access_log off;
}
everything works a treat.
Is there a way to add this to Additional nginx directives ? I know I could create a custom template but I want to apply this on a per domain basis not globally..