-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathnginx.conf
More file actions
63 lines (48 loc) · 1.74 KB
/
nginx.conf
File metadata and controls
63 lines (48 loc) · 1.74 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Web server to serve web client for staging and pull request previews
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
access_log off;
error_log stderr error;
server_tokens off;
include mime.types;
types {
application/manifest+json webmanifest;
}
default_type application/octet-stream;
charset_types application/javascript text/css application/manifest+json image/svg+xml;
sendfile on;
server {
listen 8000;
root /var/www;
charset UTF-8;
gzip_static on;
gzip on;
gzip_types text/css application/javascript application/json application/manifest+json image/svg+xml;
error_page 404 /404.html;
error_page 500 /500.html;
absolute_redirect off;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
add_header X-Content-Type-Options "nosniff";
add_header Content-Security-Policy "object-src 'none'; frame-ancestors 'none'; form-action 'none'; base-uri 'none'; style-src 'sha256-SmAM1DSNiCCdAEabBHfOLWn8GuDZmajUjuFmodxWN5E=' 'sha256-MQAdkik2UpIegx87oj4jDzvVmtZQHZ8UHLkaMPDUYns=' 'sha256-6V2udMXGcrAVUt4WPmtKduau7GKHBV09b7CIdEvxvK4=' 'self'; script-src 'sha256-iliif2S6Fr8mQazzDJs2huHUeow98/TYx+Staat/56E=' 'self'; require-trusted-types-for 'script'; trusted-types dompurify slowreader-rich svelte-trusted-html slowreader-parse";
location ~* __ROUTES__ {
try_files /index.html =404;
}
location ~* ^(/ui)?/assets {
expires 1y;
add_header Cache-Control 'public';
}
rewrite ^/ui$ /ui/ permanent;
location /ui/ {
add_header Content-Security-Policy "";
try_files $uri $uri/ =404;
}
location / {
rewrite ^(.+)/$ $1 permanent;
try_files $uri $uri/ =404;
}
}
}