mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-26 17:52:59 +02:00
Nginx again
This commit is contained in:
parent
9be7f9637e
commit
126b4dc1b2
@ -6,6 +6,11 @@ http {
|
|||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
# Add .mjs MIME type mapping
|
||||||
|
types {
|
||||||
|
text/javascript mjs;
|
||||||
|
}
|
||||||
|
|
||||||
# Gzip compression
|
# Gzip compression
|
||||||
gzip on;
|
gzip on;
|
||||||
gzip_vary on;
|
gzip_vary on;
|
||||||
@ -92,7 +97,8 @@ http {
|
|||||||
|
|
||||||
# Serve .mjs files with correct MIME type (must come before general static assets)
|
# Serve .mjs files with correct MIME type (must come before general static assets)
|
||||||
location ~* \.mjs$ {
|
location ~* \.mjs$ {
|
||||||
add_header Content-Type text/javascript;
|
try_files $uri =404;
|
||||||
|
add_header Content-Type "text/javascript; charset=utf-8" always;
|
||||||
expires 1y;
|
expires 1y;
|
||||||
add_header Cache-Control "public, immutable";
|
add_header Cache-Control "public, immutable";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user