From 22f9e76d7fdfd88ba5cd17c5769f52cc01572132 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 6 Jan 2022 14:07:07 +0100 Subject: [PATCH] Remove is_public, and add path_url --- conf/nginx.conf | 5 +++-- manifest.json | 9 +++++---- scripts/install | 14 +------------- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index c8cd24c..c4d82af 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,7 +1,8 @@ location __PATH__/ { - proxy_pass http://127.0.0.1:__PORT__; - proxy_redirect off; + proxy_pass http://127.0.0.1:__PORT__/; + proxy_redirect / __PATH__/; + proxy_cookie_path / __PATH__/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; diff --git a/manifest.json b/manifest.json index 5816900..86057a3 100644 --- a/manifest.json +++ b/manifest.json @@ -28,14 +28,15 @@ "nginx" ], "arguments": { - "install": [{ + "install": [ + { "name": "domain", "type": "domain" }, { - "name": "is_public", - "type": "boolean", - "default": true + "name": "path", + "type": "path", + "default": "/adguard" }, { "name": "admin", diff --git a/scripts/install b/scripts/install index fe936ec..eeb5b06 100644 --- a/scripts/install +++ b/scripts/install @@ -22,8 +22,7 @@ ynh_abort_if_errors # Retrieve arguments domain=$YNH_APP_ARG_DOMAIN -path_url="/" -is_public=$YNH_APP_ARG_IS_PUBLIC +path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN password=$YNH_APP_ARG_PASSWORD architecture=$YNH_ARCH @@ -194,17 +193,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2 # Start a systemd service ynh_systemd_action --service_name=$app --action="restart" --log_path=systemd -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Configuring permissions..." --weight=1 - -# Make app public if necessary -if [ $is_public -eq 1 ] -then - ynh_permission_update --permission="main" --add="visitors" -fi - #================================================= # RELOAD NGINX #=================================================