mirror of
https://github.com/YunoHost-Apps/diagramsnet_ynh.git
synced 2024-09-03 18:26:33 +02:00
Force http parameter to disable 3rds parties
This commit is contained in:
parent
2846406ada
commit
26f9110717
2 changed files with 19 additions and 0 deletions
|
@ -66,6 +66,16 @@ ynh_script_progression --message="Configuring nginx web server..." --weight=15
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REMOVE CALLS TO THIRD PARTY WEBSITES
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Add "offline" parameter in index.html
|
||||||
|
# See https://desk.draw.io/support/solutions/articles/16000042546-what-url-parameters-are-supported-
|
||||||
|
# and https://shelter.moe/@Neil/103928506546498078 [French]
|
||||||
|
sed_pattern='s/var params = window.location.search.slice(1).split('&');/&\n\t\t\tparams.push(\"offline=1\");/g'
|
||||||
|
sed -i "$sed_pattern" "$final_path/src/main/webapp/index.html"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -71,8 +71,17 @@ ynh_script_progression --message="Upgrading nginx web server configuration..." -
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
# REMOVE CALLS TO THIRD PARTY WEBSITES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
|
then
|
||||||
|
# Add "offline" parameter in index.html
|
||||||
|
# See https://desk.draw.io/support/solutions/articles/16000042546-what-url-parameters-are-supported-
|
||||||
|
# and https://shelter.moe/@Neil/103928506546498078 [French]
|
||||||
|
sed_pattern='s/var params = window.location.search.slice(1).split('&');/&\n\t\t\tparams.push(\"offline=1\");/g'
|
||||||
|
sed -i "$sed_pattern" "$final_path/src/main/webapp/index.html"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SECURE FILES AND DIRECTORIES
|
# SECURE FILES AND DIRECTORIES
|
||||||
|
|
Loading…
Reference in a new issue