Use path_url instead of path, because helpers require it

This commit is contained in:
Alexandre Aubin 2019-05-09 19:57:27 +02:00
parent 6cfc256603
commit ef4ed69b65
3 changed files with 9 additions and 9 deletions

View file

@ -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\+&@#/%=~_|]'

View file

@ -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

View file

@ -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\+&@#/%=~_|]'