mirror of
https://github.com/YunoHost-Apps/bozon_ynh.git
synced 2024-09-03 18:16:09 +02:00
commit
b5d0fb2001
2 changed files with 5 additions and 4 deletions
|
@ -4,6 +4,8 @@ location __PATH__/ {
|
||||||
# Path to source
|
# Path to source
|
||||||
alias __FINALPATH__/;
|
alias __FINALPATH__/;
|
||||||
|
|
||||||
|
index index.php;
|
||||||
|
|
||||||
# Add headers to serve security related headers
|
# Add headers to serve security related headers
|
||||||
more_set_headers "Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;";
|
more_set_headers "Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;";
|
||||||
more_set_headers "X-Content-Type-Options: nosniff";
|
more_set_headers "X-Content-Type-Options: nosniff";
|
||||||
|
@ -22,8 +24,6 @@ location __PATH__/ {
|
||||||
# Disable gzip to avoid the removal of the ETag header
|
# Disable gzip to avoid the removal of the ETag header
|
||||||
gzip off;
|
gzip off;
|
||||||
|
|
||||||
index index.php;
|
|
||||||
|
|
||||||
try_files $uri $uri/ index.php;
|
try_files $uri $uri/ index.php;
|
||||||
location ~ [^/]\.php(/|$) {
|
location ~ [^/]\.php(/|$) {
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
|
@ -39,11 +39,11 @@ location __PATH__/ {
|
||||||
fastcgi_intercept_errors on;
|
fastcgi_intercept_errors on;
|
||||||
fastcgi_read_timeout 60m;
|
fastcgi_read_timeout 60m;
|
||||||
fastcgi_send_timeout 60m;
|
fastcgi_send_timeout 60m;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ^~ __PATH__/(uploads|thumbs){
|
location ^~ __PATH__/(uploads|thumbs){
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ^~ __PATH__/private {
|
location ^~ __PATH__/private {
|
||||||
deny all;
|
deny all;
|
||||||
|
|
|
@ -157,6 +157,7 @@ if [ $is_public -eq 0 ]; then
|
||||||
domainluaregex=$(echo "$domain" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
domainluaregex=$(echo "$domain" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
||||||
pathluaregex=$([ "$path_url" == "/" ] || echo "$path_url" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
pathluaregex=$([ "$path_url" == "/" ] || echo "$path_url" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
||||||
regexList="${domainluaregex}${pathluaregex}/index%.php$","${domainluaregex}${pathluaregex}/index%.php%?p=.*$"
|
regexList="${domainluaregex}${pathluaregex}/index%.php$","${domainluaregex}${pathluaregex}/index%.php%?p=.*$"
|
||||||
|
ynh_app_setting_set --app="$app" --key=protected_regex --value="$regexList"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue