mirror of
https://github.com/YunoHost-Apps/reverseproxy_ynh.git
synced 2024-09-03 20:16:23 +02:00
Fix regular expression to detect unix sockets
The ^ character was quoted causing it to be matched literally.
This commit is contained in:
parent
2dddaf0bb6
commit
ae775497fe
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
||||||
# - plaintext http is only allowed to localhost (to avoid leaking credentials on the network)
|
# - plaintext http is only allowed to localhost (to avoid leaking credentials on the network)
|
||||||
# - http(s) destination is webroot, no additional component allowed (eg. http://localhost:1234/test is invalid)
|
# - http(s) destination is webroot, no additional component allowed (eg. http://localhost:1234/test is invalid)
|
||||||
rp_validate_proxy_path() {
|
rp_validate_proxy_path() {
|
||||||
if [[ ! $proxy_path =~ '^unix:/' ]]; then
|
if [[ ! $proxy_path =~ ^'unix:/' ]]; then
|
||||||
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
|
||||||
|
|
Loading…
Add table
Reference in a new issue