Skip to content

Commit 1543d1e

Browse files
authored
[Chore] Improve trusted proxies (#217)
1 parent 9489928 commit 1543d1e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docker/configurations/Caddyfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
redir /.well-known/carddav /dav/
99

1010
root * /var/www/davis/public
11-
php_fastcgi unix//var/run/php-fpm/php-fpm.sock
11+
php_fastcgi unix//var/run/php-fpm/php-fpm.sock {
12+
# Preserve the original X-Forwarded-Proto from upstream, as it might be HTTPS
13+
header_up X-Forwarded-Proto {http.request.header.X-Forwarded-Proto}
14+
header_up X-Forwarded-Host {http.request.header.X-Forwarded-Host}
15+
header_up X-Forwarded-For {http.request.header.X-Forwarded-For}
16+
}
17+
1218
file_server {
1319
# Safety net, just in case
1420
hide .git .gitignore

0 commit comments

Comments
 (0)