From ca59e585d81d953b79c117eeb3c61743ad4ac85d Mon Sep 17 00:00:00 2001 From: Julian Reinhardt Date: Mon, 25 Oct 2021 14:58:02 +0200 Subject: [PATCH] Uses variable in proxy_pass for normal proxy hosts --- docker/rootfs/etc/nginx/conf.d/include/proxy.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/rootfs/etc/nginx/conf.d/include/proxy.conf b/docker/rootfs/etc/nginx/conf.d/include/proxy.conf index c0dce061..1fda72b9 100644 --- a/docker/rootfs/etc/nginx/conf.d/include/proxy.conf +++ b/docker/rootfs/etc/nginx/conf.d/include/proxy.conf @@ -1,8 +1,9 @@ +set $upstream $forward_scheme://$server:$port$request_uri; add_header X-Served-By $host; proxy_set_header Host $host; proxy_set_header X-Forwarded-Scheme $scheme; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Real-IP $remote_addr; -proxy_pass $forward_scheme://$server:$port; +proxy_pass $upstream;