From 7e3d7ba45d4596d2172aa13aefc65413fffc06f7 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 6 Jun 2019 23:16:31 +0200 Subject: [PATCH 1/2] Fix Can't show iframes on other domains --- scripts/install | 6 ++++++ scripts/remove | 4 ++++ scripts/restore | 6 ++++++ scripts/upgrade | 6 ++++++ 4 files changed, 22 insertions(+) diff --git a/scripts/install b/scripts/install index 1ddc5bb..0d3e44e 100644 --- a/scripts/install +++ b/scripts/install @@ -158,6 +158,12 @@ ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_f #Create the admin settings file touch "$final_path/config/local-production.json" +#================================================= +# FIX NGINX DOMAIN CONFIGURATION +#================================================= + +ynh_replace_string --match_string="X-Frame-Options : SAMEORIGIN" --replace_string="X-Frame-Options : ALLOWALL" --target_file="/etc/nginx/conf.d/$domain.conf" + #================================================= # STORE THE CHECKSUM OF THE CONFIG FILE #================================================= diff --git a/scripts/remove b/scripts/remove index 873f08d..ffdd851 100644 --- a/scripts/remove +++ b/scripts/remove @@ -98,6 +98,10 @@ fi #================================================= # SPECIFIC REMOVE #================================================= +# RESTORE ORIGINAL NGINX DOMAIN CONFIGURATION +#================================================= + +ynh_replace_string --match_string="X-Frame-Options : ALLOWALL" --replace_string="X-Frame-Options : SAMEORIGIN" --target_file="/etc/nginx/conf.d/$domain.conf" #================================================= # GENERIC FINALIZATION diff --git a/scripts/restore b/scripts/restore index ec64956..cb4e784 100644 --- a/scripts/restore +++ b/scripts/restore @@ -101,6 +101,12 @@ fi # Install Yarn ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" +#================================================= +# FIX NGINX DOMAIN CONFIGURATION +#================================================= + +ynh_replace_string --match_string="X-Frame-Options : SAMEORIGIN" --replace_string="X-Frame-Options : ALLOWALL" --target_file="/etc/nginx/conf.d/$domain.conf" + #================================================= # RESTORE THE POSTGRESQL DATABASE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index aef0c55..7d58b70 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -177,6 +177,12 @@ ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_f ynh_store_file_checksum "$final_path/config/local-production.json" ynh_store_file_checksum "$final_path/config/production.yaml" +#================================================= +# FIX NGINX DOMAIN CONFIGURATION +#================================================= + +ynh_replace_string --match_string="X-Frame-Options : SAMEORIGIN" --replace_string="X-Frame-Options : ALLOWALL" --target_file="/etc/nginx/conf.d/$domain.conf" + #================================================= # BUILD YARN DEPENDENCIES #================================================= From fa6c7e348b7cb184a335d58465eec5eb2867cd01 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 6 Jun 2019 23:19:51 +0200 Subject: [PATCH 2/2] upgrade version --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 0be169a..71165d3 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" }, - "version": "1.3.0~ynh1", + "version": "1.3.0~ynh2", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": [