mirror of
https://github.com/YunoHost-Apps/bozon_ynh.git
synced 2024-09-03 18:16:09 +02:00
Merge pull request #23
Protected regex + Fix timed out sur gros fichiers #15
This commit is contained in:
commit
5d8f867b32
2 changed files with 4 additions and 3 deletions
|
@ -16,6 +16,8 @@ location YNH_EXAMPLE_PATH {
|
|||
|
||||
# Set max upload size
|
||||
client_max_body_size YNH_FILE_SIZE;
|
||||
client_body_timeout 30m;
|
||||
proxy_read_timeout 30m;
|
||||
fastcgi_buffers 64 4K;
|
||||
|
||||
# Disable gzip to avoid the removal of the ETag header
|
||||
|
|
|
@ -123,11 +123,10 @@ sudo sed -i "/# $app/d" /etc/hosts
|
|||
# if app is private, remove url to SSOWat conf from skipped_uris
|
||||
if [ "$is_public" = "No" ];
|
||||
then
|
||||
ynh_app_setting_delete "$app" unprotected_uris
|
||||
# escape magic chars in vars (lua magic chars are ().%+-*?[^$ according to https://www.lua.org/pil/20.2.html)
|
||||
domainluaregex=$(echo "$domain" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
||||
pathluaregex=$([ "$path" == "/" ] || echo "$path" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
||||
regexList="${domainluaregex}${pathluaregex}/index.php%?f=.+$","${domainluaregex}${pathluaregex}/index.php%?zipfolder=.+$","${domainluaregex}${pathluaregex}/private/temp/.+%.zip$","${domainluaregex}${pathluaregex}/core/js/.*$","${domainluaregex}${pathluaregex}/templates/.*$"
|
||||
ynh_app_setting_set "$app" unprotected_regex "$regexList"
|
||||
regexList="${domainluaregex}${pathluaregex}/index%.php$","${domainluaregex}${pathluaregex}/index%.php%?p=.*$"
|
||||
ynh_app_setting_set "$app" protected_regex "$regexList"
|
||||
sudo yunohost app ssowatconf
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue