mirror of
https://github.com/YunoHost-Apps/reverseproxy_ynh.git
synced 2024-09-03 20:16:23 +02:00
Use path_url instead of path, because helpers require it
This commit is contained in:
parent
6cfc256603
commit
ef4ed69b65
3 changed files with 9 additions and 9 deletions
|
@ -34,18 +34,18 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
|
||||
# Retrieve arguments
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path=$YNH_APP_ARG_PATH
|
||||
path_url=$YNH_APP_ARG_PATH
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
redirect_type=$YNH_APP_ARG_REDIRECT_TYPE
|
||||
redirect_path=$YNH_APP_ARG_REDIRECT_PATH
|
||||
|
||||
# Remove trailing slash to path
|
||||
path=${path%/}
|
||||
path_url=${path_url%/}
|
||||
#force location to be / or /foo
|
||||
location=${path:-/}
|
||||
location=${path_url:-/}
|
||||
|
||||
# Check domain/path availability
|
||||
ynh_webpath_register $app $domain $path
|
||||
ynh_webpath_register $app $domain $path_url
|
||||
|
||||
# Validate redirect path
|
||||
url_regex='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'
|
||||
|
|
|
@ -39,13 +39,13 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
|
||||
# Retrieve arguments
|
||||
domain=$(ynh_app_setting_get "$app" domain)
|
||||
path=$(ynh_app_setting_get "$app" path)
|
||||
path_url=$(ynh_app_setting_get "$app" path_url)
|
||||
is_public=$(ynh_app_setting_get "$app" is_public)
|
||||
redirect_type=$(ynh_app_setting_get "$app" redirect_type)
|
||||
redirect_path=$(ynh_app_setting_get "$app" redirect_path)
|
||||
|
||||
# Remove trailing slash to path
|
||||
path=${path%/}
|
||||
path_url=${path_url%/}
|
||||
|
||||
# Check domain/path availability
|
||||
ynh_webpath_register $app $domain $path
|
||||
|
|
|
@ -31,7 +31,7 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
|
||||
# Retrieve arguments
|
||||
domain=$(ynh_app_setting_get "$app" domain)
|
||||
path=$(ynh_app_setting_get "$app" path)
|
||||
path_url=$(ynh_app_setting_get "$app" path)
|
||||
is_public=$(ynh_app_setting_get "$app" is_public)
|
||||
redirect_type=$(ynh_app_setting_get "$app" redirect_type)
|
||||
redirect_path=$(ynh_app_setting_get "$app" redirect_path)
|
||||
|
@ -70,9 +70,9 @@ ynh_clean_setup () {
|
|||
ynh_abort_if_errors
|
||||
|
||||
# Remove trailing slash to path
|
||||
path=${path%/}
|
||||
path_url=${path_url%/}
|
||||
#force location to be / or /foo
|
||||
location=${path:-/}
|
||||
location=${path_url:-/}
|
||||
|
||||
# Validate redirect path
|
||||
url_regex='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'
|
||||
|
|
Loading…
Reference in a new issue