feat: proxy the web interface for stored logs
This commit is contained in:
52
config/root/etc/nginx/logs_location.conf
Normal file
52
config/root/etc/nginx/logs_location.conf
Normal file
@@ -0,0 +1,52 @@
|
||||
# Web server logs (Caches static files by default)
|
||||
location /web-logs/ {
|
||||
proxy_pass http://127.0.0.1:23020/;
|
||||
|
||||
# Global Headers: Natively inherited by all nested child blocks
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Host $x_forwarded_host;
|
||||
proxy_set_header X-Forwarded-Port $x_forwarded_port;
|
||||
proxy_set_header X-Forwarded-Proto $x_forwarded_proto;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_redirect / /web-logs/;
|
||||
|
||||
# Path rewrite engines
|
||||
proxy_set_header Accept-Encoding "";
|
||||
sub_filter "+ '/ws'" "+ '/web-logs/ws'";
|
||||
sub_filter_once off;
|
||||
sub_filter_types text/javascript;
|
||||
|
||||
# Enable Cache for UI static assets (HTML, CSS, JS, Fonts)
|
||||
proxy_cache gunicorn;
|
||||
proxy_cache_valid 200 48h;
|
||||
proxy_ignore_headers Cache-Control;
|
||||
add_header X-Cache-Status $upstream_cache_status;
|
||||
|
||||
# EXCLUSION 1: Nested Backup Route (No Caching)
|
||||
# -----------------------------------------------------------------
|
||||
location /web-logs/backup {
|
||||
proxy_pass http://127.0.0.1:23020/backup;
|
||||
proxy_cache off;
|
||||
}
|
||||
|
||||
# EXCLUSION 2: Nested WebSocket Route (No Caching + Upgrade)
|
||||
# -----------------------------------------------------------------
|
||||
location /web-logs/ws {
|
||||
proxy_pass http://127.0.0.1:23020/ws;
|
||||
proxy_redirect off;
|
||||
|
||||
# Protocol upgrade parameters
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
# Protect live streaming data chunk boundaries
|
||||
proxy_cache off;
|
||||
sub_filter_types "";
|
||||
proxy_buffering off;
|
||||
proxy_read_timeout 86400s;
|
||||
proxy_send_timeout 86400s;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,6 +169,9 @@ http {
|
||||
internal;
|
||||
alias /downloads/;
|
||||
}
|
||||
|
||||
# Web server logs
|
||||
include /etc/nginx/logs_location.conf;
|
||||
}
|
||||
|
||||
# YouTube JavaScript Cipher Challenge Solving Server
|
||||
|
||||
Reference in New Issue
Block a user