forked from VzFaK/pretix-checkin-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
44 lines (37 loc) · 1.26 KB
/
Copy pathnginx.conf
File metadata and controls
44 lines (37 loc) · 1.26 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
server {
listen 80;
server_name localhost;
include /etc/nginx/mime.types;
types {
application/javascript mjs;
}
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
# Cross-Origin Opener/Embedder Policies.
# Uncomment these if you utilize multi-threading or SharedArrayBuffers in WASM.
# add_header Cross-Origin-Opener-Policy "same-origin";
# add_header Cross-Origin-Embedder-Policy "require-corp";
}
# Ensure WebAssembly files are served with the correct MIME type
location ~* \.wasm$ {
root /usr/share/nginx/html;
types {
application/wasm wasm;
}
add_header Cache-Control "no-cache";
# add_header Cross-Origin-Opener-Policy "same-origin";
# add_header Cross-Origin-Embedder-Policy "require-corp";
}
# Cache control for static assets to improve loading times
location ~* \.(js|mjs|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
root /usr/share/nginx/html;
expires 1y;
add_header Cache-Control "public, no-transform";
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}