forked from sirjmann92/nicotineplus-proper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault
43 lines (37 loc) · 1.53 KB
/
default
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
server {
listen __PORT__;
server_name localhost;
root /var/www/;
location = /favicon.ico {
alias /var/www/favicon.ico;
expires 30d;
access_log off;
}
location / {
proxy_pass http://localhost:8085/;
proxy_set_header Accept-Encoding $http_accept_encoding;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
# Keep WebSocket connections alive
keepalive_timeout 86400s; # Timeout for idle connections
proxy_read_timeout 86400s; # Wait time for backend responses
proxy_send_timeout 86400s; # Wait time for sending data to the client
proxy_connect_timeout 60s; # Time to establish the initial connection
# Security headers
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
# Substitution filters
sub_filter_types text/plain;
sub_filter_once off;
sub_filter "<title>" "<dummy>";
sub_filter "</title>" "</dummy><title>Nicotine+</title><link rel=\"icon\" href=\"favicon.ico\" type=\"image/x-icon\">";
sub_filter "broadway 2.0" "";
}
}