Skip to content

Commit

Permalink
Update base.conf
Browse files Browse the repository at this point in the history
add configuration for *.mjs
  • Loading branch information
milanhorvath authored Jun 16, 2024
1 parent fb96d7b commit e7a647e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion locations/base.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
sub_filter </head> '</head><script language="javascript">@@INJECTED_ENV</script>';

location ~ \.html$ {

add_header X-Content-Type-Options "nosniff";
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
Expand All @@ -17,6 +16,12 @@
add_header Pragma no-cache;
}

location ~* \.mjs$ {
types {
text/javascript mjs;
}
}

# cache all images and fonts for 1 month, as they should not change
location ~* \.(?:jpg|jpeg|gif|png|ico|woff2)$ {
expires 1M;
Expand Down

0 comments on commit e7a647e

Please sign in to comment.