Franziska Kunsmann
3dc5962627
All checks were successful
bundlewrap/pipeline/head This commit looks good
47 lines
1.1 KiB
Text
47 lines
1.1 KiB
Text
location ~ ^/sites/.*/private/ {
|
|
return 403;
|
|
}
|
|
|
|
location ~ ^/sites/[^/]+/files/.*\.php$ {
|
|
deny all;
|
|
}
|
|
|
|
location ~ (^|/)\. {
|
|
return 403;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri /index.php?$query_string;
|
|
}
|
|
|
|
location @rewrite {
|
|
rewrite ^ /index.php;
|
|
}
|
|
|
|
location ~ /vendor/.*\.php$ {
|
|
deny all;
|
|
return 404;
|
|
}
|
|
|
|
location ~* \.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|/(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config)$|/#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$ {
|
|
deny all;
|
|
return 404;
|
|
}
|
|
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
|
try_files $uri @rewrite;
|
|
expires max;
|
|
log_not_found off;
|
|
}
|
|
|
|
location ~ ^/sites/.*/files/styles/ {
|
|
try_files $uri @rewrite;
|
|
}
|
|
|
|
location ~ ^(/[a-z\-]+)?/system/files/ {
|
|
try_files $uri /index.php?$query_string;
|
|
}
|
|
|
|
if ($request_uri ~* "^(.*/)index\.php/(.*)") {
|
|
return 307 $1$2;
|
|
}
|