Merge pull request #74 from sylr/no-transform
Add Cache-Control header with no-transform directive
This commit is contained in:
commit
90d1fc1ba6
1 changed files with 8 additions and 0 deletions
|
@ -18,6 +18,14 @@ server {
|
|||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ \.js$ {
|
||||
# no-transform tells Cloudflare and others to not change the content of
|
||||
# the file and thus breaking SRI.
|
||||
# https://developers.cloudflare.com/cache/about/cache-control#other
|
||||
add header Cache-Control "public, max-age=3600, must-revalidate, no-transform";
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include /etc/nginx/location.d/*.conf;
|
||||
fastcgi_pass unix:/run/php-fpm.sock;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue