-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf.template
33 lines (27 loc) · 1.03 KB
/
nginx.conf.template
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
server {
listen 3046;
server_name localhost;
set $csp "default-src 'self'; connect-src 'self' data:; base-uri 'self'; script-src 'nonce-$request_id' 'strict-dynamic' https:; object-src 'none'; font-src 'self' data:; img-src 'self' data:; style-src 'self' 'unsafe-inline';";
location /tldraw-client-runtime.config.json {
return 200 '{ "CONFIG_PATH": "${CONFIG_PATH}" }';
add_header Content-Type application/json;
}
location /assets {
alias /usr/share/nginx/html/assets/;
}
location / {
root /usr/share/nginx/html;
index index.html index.htm;
add_header Content-Security-Policy "${csp}";
add_header X-Content-Type-Options nosniff;
add_header Referrer-Policy 'same-origin';
add_header X-XSS-Protection '1; mode=block';
sub_filter_once off;
sub_filter '**CSP_NONCE**' $request_id;
try_files $uri /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}