forked from MarseyWorld/MarseyWorld
93 lines
2.3 KiB
Nginx Configuration File
93 lines
2.3 KiB
Nginx Configuration File
server {
|
|
server_name localhost;
|
|
client_max_body_size 100m;
|
|
listen 80;
|
|
listen [::]:80;
|
|
proxy_set_header Host $http_host;
|
|
include includes/headers;
|
|
add_header Content-Security-Policy "default-src 'none'; report-uri /csp_violations;";
|
|
|
|
location / {
|
|
proxy_pass http://localhost:5000/;
|
|
include includes/headers;
|
|
}
|
|
location /socket.io {
|
|
proxy_set_header Host $http_host;
|
|
proxy_http_version 1.1;
|
|
proxy_buffering off;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_pass http://localhost:5001/socket.io;
|
|
include includes/headers;
|
|
add_header Content-Security-Policy "default-src 'none'; report-uri /csp_violations;";
|
|
}
|
|
location /chat {
|
|
proxy_pass http://localhost:5001/chat;
|
|
include includes/headers;
|
|
}
|
|
|
|
location /images/ {
|
|
alias /images/;
|
|
include includes/serve-static;
|
|
}
|
|
location /videos/ {
|
|
alias /videos/;
|
|
include includes/serve-static;
|
|
}
|
|
location /audio/ {
|
|
alias /audio/;
|
|
include includes/serve-static;
|
|
}
|
|
location /songs/ {
|
|
alias /songs/;
|
|
include includes/serve-static;
|
|
}
|
|
location /asset_submissions/ {
|
|
alias /asset_submissions/;
|
|
include includes/serve-static;
|
|
}
|
|
location /archives/ {
|
|
alias /archives/;
|
|
include includes/serve-static;
|
|
}
|
|
|
|
location /assets/ {
|
|
alias /rDrama/files/assets/;
|
|
include includes/serve-static;
|
|
}
|
|
location /i/ {
|
|
alias /rDrama/files/assets/images/;
|
|
include includes/serve-static;
|
|
}
|
|
location /e/ {
|
|
alias /rDrama/files/assets/images/emojis/;
|
|
include includes/serve-static;
|
|
}
|
|
|
|
location =/robots.txt {
|
|
alias /rDrama/files/assets/robots.txt;
|
|
include includes/serve-static;
|
|
}
|
|
location =/icon.webp {
|
|
alias /rDrama/files/assets/images/rDrama/icon.webp;
|
|
include includes/serve-static;
|
|
}
|
|
location =/favicon.ico {
|
|
alias /rDrama/files/assets/images/rDrama/icon.webp;
|
|
include includes/serve-static;
|
|
}
|
|
location =/offline.html {
|
|
alias /rDrama/files/assets/offline.html;
|
|
add_header Content-Security-Policy "default-src 'none'; style-src 'unsafe-inline'; img-src data:; report-uri /csp_violations;";
|
|
|
|
}
|
|
|
|
|
|
error_page 502 = /502.html;
|
|
location =/502.html {
|
|
alias /rDrama/files/templates/errors/rDrama/502.html;
|
|
add_header Cache-Control "no-store";
|
|
add_header Content-Security-Policy "default-src 'none'; style-src 'self'; font-src 'self'; img-src 'self'; report-uri /csp_violations;";
|
|
}
|
|
}
|