diff --git a/conf/nginx-redirect.conf b/conf/nginx-redirect.conf index 8ef882a..731c42d 100644 --- a/conf/nginx-redirect.conf +++ b/conf/nginx-redirect.conf @@ -1,3 +1,3 @@ -location __PATH__/ { +location __PATH__ { return 302 __TARGET__$request_uri; } diff --git a/scripts/install b/scripts/install index b33ed9e..979fcfd 100644 --- a/scripts/install +++ b/scripts/install @@ -11,8 +11,8 @@ source /usr/share/yunohost/helpers # Avoid uncrypted remote destination with reverse proxy mode # Indeed the SSO send the password in all requests in HTTP headers url_regex='^(http://(127\.[0-9]+\.[0-9]+\.[0-9]+|localhost)|https://.*)(:[0-9]+)?(/.*)?$' -[[ "$redirect_type" = "reverseproxy" ]] && [[ ! $redirect_path =~ $url_regex ]] && ynh_die \ -"For secure reason, you can't use an unencrypted http remote destination coupled with ssowat for your reverse proxy: $redirect_path" 1 +[[ "$redirect_type" = "reverseproxy" ]] && [[ ! "$target" =~ $url_regex ]] && ynh_die \ +"For secure reason, you can't use an unencrypted http remote destination coupled with ssowat for your reverse proxy: $target" 1 #================================================= # CONFIGURE NGINX