From 18e8ab1ccc130d30d1628853080cd47b26eaae75 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Sun, 17 Nov 2024 07:08:52 +0100 Subject: [PATCH] add X-Forwarded-Proto --- contrib/nginx/radicale.conf | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/contrib/nginx/radicale.conf b/contrib/nginx/radicale.conf index b05183eb..5d63e523 100644 --- a/contrib/nginx/radicale.conf +++ b/contrib/nginx/radicale.conf @@ -3,15 +3,16 @@ ### Usual configuration file location: /etc/nginx/default.d/ ## Base URI: /radicale/ -#location /radicale/ { -# proxy_pass http://localhost:5232/; -# proxy_set_header X-Script-Name /radicale; -# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -# proxy_set_header X-Forwarded-Host $host; -# proxy_set_header X-Forwarded-Port $server_port; -# proxy_set_header Host $http_host; -# proxy_pass_header Authorization; -#} +location /radicale/ { + proxy_pass http://localhost:5232/; + proxy_set_header X-Script-Name /radicale; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Port $server_port; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Host $http_host; + proxy_pass_header Authorization; +} ## Base URI: / #location / { @@ -20,6 +21,7 @@ # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # proxy_set_header X-Forwarded-Host $host; # proxy_set_header X-Forwarded-Port $server_port; +# proxy_set_header X-Forwarded-Proto $scheme; # proxy_set_header Host $http_host; # proxy_pass_header Authorization; #}