mirror of
https://github.com/YunoHost-Apps/flarum_ynh.git
synced 2024-09-03 18:36:24 +02:00
[fix] path traversal and more_set_headers
This commit is contained in:
parent
49fd50ed91
commit
d53fee45ab
1 changed files with 6 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
location ^~ __PATH__ {
|
location ^~ __PATH__/ {
|
||||||
|
|
||||||
if ($scheme = http) {
|
if ($scheme = http) {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
|
@ -23,25 +23,25 @@ location ^~ __PATH__ {
|
||||||
|
|
||||||
# Expire rules for static content
|
# Expire rules for static content
|
||||||
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
|
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
|
||||||
add_header Cache-Control "max-age=0";
|
more_set_headers "Cache-Control: max-age=0";
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* \.(?:rss|atom)$ {
|
location ~* \.(?:rss|atom)$ {
|
||||||
add_header Cache-Control "max-age=3600";
|
more_set_headers "Cache-Control: max-age=3600";
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc)$ {
|
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc)$ {
|
||||||
add_header Cache-Control "max-age=2592000";
|
more_set_headers "Cache-Control: max-age=2592000";
|
||||||
access_log off;
|
access_log off;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* \.(?:css|js)$ {
|
location ~* \.(?:css|js)$ {
|
||||||
add_header Cache-Control "max-age=31536000";
|
more_set_headers "Cache-Control: max-age=31536000";
|
||||||
access_log off;
|
access_log off;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ {
|
location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ {
|
||||||
add_header Cache-Control "max-age=2592000";
|
more_set_headers "Cache-Control: max-age=2592000";
|
||||||
access_log off;
|
access_log off;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue