From 9c6d8e96a82e3094bc4783082c0523d2b497a3b2 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 5 Dec 2023 02:01:28 +0100 Subject: [PATCH] =?UTF-8?q?Zbmlgrerg=E2=81=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/nginx-redirect.conf | 2 +- scripts/install | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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