mirror of
https://github.com/YunoHost-Apps/reverseproxy_ynh.git
synced 2024-09-03 20:16:23 +02:00
Don't stop additional components in UDS
This commit is contained in:
parent
78952a2db0
commit
82419e03bf
1 changed files with 10 additions and 10 deletions
|
@ -11,9 +11,8 @@ rp_validate_proxy_path() {
|
||||||
url_regex='^(http://(127\.[0-9]+\.[0-9]+\.[0-9]+|localhost)|https://.*)(:[0-9]+)?(/.*)?$'
|
url_regex='^(http://(127\.[0-9]+\.[0-9]+\.[0-9]+|localhost)|https://.*)(:[0-9]+)?(/.*)?$'
|
||||||
[[ ! "$proxy_path" =~ $url_regex ]] && ynh_die \
|
[[ ! "$proxy_path" =~ $url_regex ]] && ynh_die \
|
||||||
"For secure reason, you can't use an unencrypted http remote destination couple with ssowat for your reverse proxy: $proxy_path" 1
|
"For secure reason, you can't use an unencrypted http remote destination couple with ssowat for your reverse proxy: $proxy_path" 1
|
||||||
fi
|
|
||||||
|
|
||||||
# Don't allow trailing slash or additional URI components in proxy_path
|
# Don't allow trailing slash or additional URI components in proxy_path if not unix domain socket
|
||||||
if [[ "$proxy_path" =~ ^https?:// ]]; then
|
if [[ "$proxy_path" =~ ^https?:// ]]; then
|
||||||
res="${proxy_path//[^\/]}"
|
res="${proxy_path//[^\/]}"
|
||||||
if [[ "${#res}" != "2" ]]; then
|
if [[ "${#res}" != "2" ]]; then
|
||||||
|
@ -25,6 +24,7 @@ rp_validate_proxy_path() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Verify that the requested assets path is valid
|
# Verify that the requested assets path is valid
|
||||||
|
|
Loading…
Add table
Reference in a new issue