mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
refactor: nginx config
Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user