57 lines
1.2 KiB
Nginx Configuration File
57 lines
1.2 KiB
Nginx Configuration File
map $arg_v $aego_cache {
|
|
"" "public, max-age=300";
|
|
default "public, max-age=31536000, immutable";
|
|
}
|
|
|
|
map $http_accept_encoding $aego_br {
|
|
"~*\bbr\b" ".br";
|
|
default "";
|
|
}
|
|
|
|
map $aego_br $aego_br_encoding {
|
|
".br" "br";
|
|
default "";
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
root /usr/share/nginx/html;
|
|
gzip_static on;
|
|
gzip_vary on;
|
|
absolute_redirect off;
|
|
|
|
location = /healthz {
|
|
default_type text/plain;
|
|
return 200 "ok";
|
|
}
|
|
|
|
location ~ \.wasm$ {
|
|
types { }
|
|
default_type application/wasm;
|
|
add_header Cache-Control $aego_cache;
|
|
add_header Content-Encoding $aego_br_encoding;
|
|
add_header Vary Accept-Encoding;
|
|
try_files $uri$aego_br $uri =404;
|
|
}
|
|
|
|
location ~ ^/install\.(sh|ps1)$ {
|
|
default_type text/plain;
|
|
add_header Cache-Control "no-cache";
|
|
}
|
|
|
|
location ~ \.(html|json)$ {
|
|
add_header Cache-Control "public, max-age=60";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location = / {
|
|
add_header Cache-Control "public, max-age=60";
|
|
try_files /index.html =404;
|
|
}
|
|
|
|
location / {
|
|
add_header Cache-Control $aego_cache;
|
|
try_files $uri $uri.html $uri/ =404;
|
|
}
|
|
}
|