Enhance Pi-hole configuration with additional proxy headers and settings for improved request handling
This commit is contained in:
parent
d3ea74d718
commit
c7095bf359
@ -73,16 +73,32 @@ server {
|
||||
# ---- Pi-hole admin at /admin/ ----
|
||||
# Pi-hole’s UI lives under /admin/, so keep the trailing slash in proxy_pass.
|
||||
location /admin/ {
|
||||
proxy_pass http://pihole_upstream/admin/;
|
||||
proxy_pass http://pihole_upstream/admin/;Ï
|
||||
include snippets/proxy-common.conf;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_redirect off;
|
||||
}
|
||||
|
||||
# Pi-hole API (some UI calls hit /api/)
|
||||
location /api/ {
|
||||
proxy_pass http://pihole_upstream/api/;
|
||||
include snippets/proxy-common.conf;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_redirect off;
|
||||
}
|
||||
|
||||
# redirect /watch-party -> /watch-party/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user