From 260a432b195758178df4b4d56a131472ba246e83 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 13 Dec 2020 14:00:39 +0100 Subject: [PATCH] Fix --- conf/nginx.conf | 22 ++++++++++------------ scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 347894e..8e8e96d 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,3 @@ -#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { # Force usage of https @@ -6,18 +5,17 @@ location __PATH__/ { rewrite ^ https://$server_name$request_uri? permanent; } - proxy_pass http://127.0.0.1:__PORT__/; - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host $server_name; - - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +#sub_path_only rewrite ^__PATH__/admin$ __PATH__/admin/ permanent; + proxy_pass http://127.0.0.1:__PORT__/; + proxy_set_header Host $host; + proxy_buffering off; + more_set_headers "X-Frame-Options : ALLOWALL"; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } + +location ~* __PATH__/p/[^/]*(_|%|\*)[^/]*/export/etherpad { + return 404; +} diff --git a/scripts/install b/scripts/install index 453ec4a..d37e377 100644 --- a/scripts/install +++ b/scripts/install @@ -71,7 +71,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port #================================================= ynh_script_progression --message="Installing dependencies..." --weight=12 -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_install_nodejs --nodejs_version=$nodejs_version diff --git a/scripts/restore b/scripts/restore index dba8fb7..1f9e95c 100644 --- a/scripts/restore +++ b/scripts/restore @@ -64,7 +64,7 @@ ynh_restore_file --origin_path="$final_path" ynh_script_progression --message="Reinstalling dependencies..." --weight=7 # Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version diff --git a/scripts/upgrade b/scripts/upgrade index d5d1cc3..3260a3f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -107,7 +107,7 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Installing dependencies..." --weight=12 -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_install_nodejs --nodejs_version=$nodejs_version