MarseyWorld/nginx.conf

93 lines
2.3 KiB
Nginx Configuration File
Raw Normal View History

server {
2022-12-12 07:44:13 +00:00
server_name localhost;
2022-10-02 18:27:18 +00:00
client_max_body_size 100m;
2022-10-04 19:48:52 +00:00
listen 80;
listen [::]:80;
proxy_set_header Host $http_host;
2022-12-12 07:44:13 +00:00
include includes/headers;
2022-12-27 02:38:08 +00:00
add_header Content-Security-Policy "default-src 'none'; report-uri /csp_violations;";
2022-10-02 18:27:18 +00:00
location / {
proxy_pass http://localhost:5000/;
2022-12-13 16:24:12 +00:00
include includes/headers;
2022-10-02 18:27:18 +00:00
}
location /socket.io {
2022-10-04 19:48:52 +00:00
proxy_set_header Host $http_host;
2022-10-02 18:27:18 +00:00
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;
2022-12-13 16:24:12 +00:00
include includes/headers;
2022-12-27 02:38:08 +00:00
add_header Content-Security-Policy "default-src 'none'; report-uri /csp_violations;";
2022-10-02 18:27:18 +00:00
}
location /chat {
proxy_pass http://localhost:5001/chat;
2022-12-13 16:24:12 +00:00
include includes/headers;
2022-10-02 18:27:18 +00:00
}
location /images/ {
2022-12-12 07:44:13 +00:00
alias /images/;
2022-10-02 18:27:18 +00:00
include includes/serve-static;
}
location /videos/ {
2022-12-12 07:44:13 +00:00
alias /videos/;
2022-10-02 18:27:18 +00:00
include includes/serve-static;
}
location /audio/ {
2022-12-12 07:44:13 +00:00
alias /audio/;
2022-10-02 18:27:18 +00:00
include includes/serve-static;
}
2022-12-10 12:21:52 +00:00
location /songs/ {
2022-12-12 07:44:13 +00:00
alias /songs/;
2022-12-10 12:21:52 +00:00
include includes/serve-static;
}
2022-10-02 18:27:18 +00:00
location /asset_submissions/ {
2022-12-12 07:44:13 +00:00
alias /asset_submissions/;
2022-10-02 18:27:18 +00:00
include includes/serve-static;
}
2022-12-10 12:21:52 +00:00
location /archives/ {
2022-12-12 07:44:13 +00:00
alias /archives/;
2022-12-10 12:21:52 +00:00
include includes/serve-static;
}
location /assets/ {
alias /rDrama/files/assets/;
2022-12-12 07:44:13 +00:00
include includes/serve-static;
2022-12-10 12:21:52 +00:00
}
location /i/ {
alias /rDrama/files/assets/images/;
2022-12-12 07:44:13 +00:00
include includes/serve-static;
2022-12-10 12:21:52 +00:00
}
location /e/ {
alias /rDrama/files/assets/images/emojis/;
2022-12-12 07:44:13 +00:00
include includes/serve-static;
2022-12-10 12:21:52 +00:00
}
2022-12-10 13:02:40 +00:00
location =/robots.txt {
2022-12-10 12:21:52 +00:00
alias /rDrama/files/assets/robots.txt;
2022-12-12 07:44:13 +00:00
include includes/serve-static;
2022-12-10 12:21:52 +00:00
}
2022-12-10 13:02:40 +00:00
location =/icon.webp {
2022-12-10 12:21:52 +00:00
alias /rDrama/files/assets/images/rDrama/icon.webp;
2022-12-12 07:44:13 +00:00
include includes/serve-static;
2022-12-10 12:21:52 +00:00
}
2022-12-27 01:22:39 +00:00
location =/favicon.ico {
alias /rDrama/files/assets/images/rDrama/icon.webp;
include includes/serve-static;
}
location =/offline.html {
alias /rDrama/files/assets/offline.html;
2022-12-27 02:38:08 +00:00
add_header Content-Security-Policy "default-src 'none'; style-src 'unsafe-inline'; img-src data:; report-uri /csp_violations;";
2022-12-27 01:22:39 +00:00
}
2022-12-10 13:02:40 +00:00
error_page 502 = /502.html;
location =/502.html {
alias /rDrama/files/templates/errors/rDrama/502.html;
2022-12-10 12:34:38 +00:00
add_header Cache-Control "no-store";
2022-12-27 02:38:08 +00:00
add_header Content-Security-Policy "default-src 'none'; style-src 'self'; font-src 'self'; img-src 'self'; report-uri /csp_violations;";
}
2022-10-02 18:27:18 +00:00
}