fix: prepare frontend production exports
This commit is contained in:
35
deploy/nginx/whaletown-front-v2.conf.example
Normal file
35
deploy/nginx/whaletown-front-v2.conf.example
Normal file
@@ -0,0 +1,35 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name whaletown.xinghangee.icu;
|
||||
|
||||
root /var/www/whale-town-front-v2/build/web;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location = /index.html {
|
||||
add_header Cache-Control "no-cache";
|
||||
}
|
||||
|
||||
location ~* \.wasm$ {
|
||||
default_type application/wasm;
|
||||
expires 5m;
|
||||
add_header Cache-Control "public, max-age=300";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location ~* \.pck$ {
|
||||
default_type application/octet-stream;
|
||||
expires 5m;
|
||||
add_header Cache-Control "public, max-age=300";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location ~* \.(?:js|png|ico)$ {
|
||||
expires 5m;
|
||||
add_header Cache-Control "public, max-age=300";
|
||||
try_files $uri =404;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user