mirror of
https://github.com/YunoHost-Apps/redirect_ynh.git
synced 2024-09-03 20:16:10 +02:00
Apply suggestions from code review
This commit is contained in:
parent
eb97930c1d
commit
5548c13111
2 changed files with 3 additions and 9 deletions
|
@ -7,7 +7,7 @@ description.fr = "Créer une redirection ou un proxy vers un autre emplacement"
|
|||
|
||||
version = "1.0.2~ynh1"
|
||||
|
||||
maintainers = ["alexAubin"]
|
||||
maintainers = []
|
||||
|
||||
[upstream]
|
||||
license = "AGPL-3.0-or-later"
|
||||
|
@ -17,8 +17,8 @@ website = "https://github.com/YunoHost-Apps/redirect_ynh"
|
|||
yunohost = ">= 11.2"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
ldap = false
|
||||
sso = false
|
||||
ldap = "not_relevant"
|
||||
sso = "not_relevant"
|
||||
disk = "50M"
|
||||
ram.build = "50M"
|
||||
ram.runtime = "50M"
|
||||
|
@ -36,7 +36,6 @@ ram.runtime = "50M"
|
|||
ask.fr = "Emplacement de destination"
|
||||
type = "string"
|
||||
example = "http://127.0.0.1:8080/app/"
|
||||
default = "http://127.0.0.1"
|
||||
|
||||
[install.redirect_type]
|
||||
ask.en = "Redirect type"
|
||||
|
|
|
@ -12,8 +12,6 @@ source /usr/share/yunohost/helpers
|
|||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||
#=================================================
|
||||
|
||||
redirect_type=$YNH_APP_ARG_REDIRECT_TYPE
|
||||
redirect_path=$YNH_APP_ARG_REDIRECT_PATH
|
||||
|
||||
# Validate redirect path
|
||||
url_regex='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'
|
||||
|
@ -25,9 +23,6 @@ url_regex='^(http://(127\.[0-9]+\.[0-9]+\.[0-9]+|localhost)|https://.*)(:[0-9]+)
|
|||
[[ "$redirect_type" = "proxy" ]] && [[ ! $redirect_path =~ $url_regex ]] && ynh_die \
|
||||
"For secure reason, you can't use an unencrypted http remote destination couple with ssowat for your reverse proxy: $redirect_path" 1
|
||||
|
||||
# Save extra settings
|
||||
ynh_app_setting_set --app=$app --key=redirect_type --value=$redirect_type
|
||||
ynh_app_setting_set --app=$app --key=redirect_path --value=$redirect_path
|
||||
|
||||
#=================================================
|
||||
# CONFIGURE NGINX
|
||||
|
|
Loading…
Reference in a new issue