Enhance Dashy configuration with improved proxy settings and sub-filtering for path adjustments

This commit is contained in:
Nik Afiq 2026-01-24 20:34:23 +09:00
parent 5f38ba2101
commit 04b1c130a6

View File

@ -142,11 +142,28 @@ server {
location = /dashy {
return 302 /dashy/;
}
location /dashy/ {
location ^~ /dashy/ {
proxy_pass http://127.0.0.1:8084/;
include snippets/proxy-common.conf;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Prefix /dashy;
proxy_redirect / /dashy/;
proxy_cookie_path / /dashy/;
proxy_set_header Accept-Encoding "";
sub_filter_once off;
sub_filter_types text/html text/css application/javascript application/json;
sub_filter '<base href="/">' '<base href="/dashy/">';
sub_filter 'href="/' 'href="/dashy/';
sub_filter 'src="/' 'src="/dashy/';
sub_filter 'content="/' 'content="/dashy/';
sub_filter 'action="/' 'action="/dashy/';
sub_filter 'url(/' 'url(/dashy/';
}
}