refactor: nginx config

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-09-22 12:51:27 +08:00
parent b289382747
commit 96dd20e06b
+10
View File
@@ -10,6 +10,16 @@ server {
try_files $uri $uri/ /index.html;
}
# pdfjs-dist ships its worker as an ES module. Firefox rejects a module
# worker when nginx falls back to application/octet-stream for .mjs.
location ~* \.mjs$ {
types {
application/javascript mjs;
}
expires 1y;
add_header Cache-Control "public, immutable";
}
# Cache hashed assets aggressively
location ~* \.(js|css|woff2?|ttf|svg|ico|png|jpg|jpeg|webp|gif)$ {
expires 1y;