From a7cdc5e7bff1011250b4a20f582fd0960e963838 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 5 Mar 2018 17:49:24 +0000 Subject: [PATCH] Move removals to the end to cover entire file --- src/freedombone-app-fedwiki | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/freedombone-app-fedwiki b/src/freedombone-app-fedwiki index 8197e49a..cd3f1001 100755 --- a/src/freedombone-app-fedwiki +++ b/src/freedombone-app-fedwiki @@ -339,12 +339,6 @@ function fedwiki_setup_web { function_check nginx_ssl nginx_ssl "$FEDWIKI_DOMAIN_NAME" mobile - sed -i '/Content-Security-Policy/d' "$fedwiki_nginx_file" - sed -i '/X-XSS-Protection/d' "$fedwiki_nginx_file" - sed -i '/X-Robots-Tag/d' "$fedwiki_nginx_file" - sed -i '/X-Download-Options/d' "$fedwiki_nginx_file" - sed -i '/X-Permitted-Cross-Domain-Policies/d' "$fedwiki_nginx_file" - { echo ' add_header X-Robots-Tag none;'; echo ' add_header X-Download-Options noopen;'; echo ' add_header X-Frame-Options DENY;'; @@ -371,8 +365,6 @@ function fedwiki_setup_web { echo " listen 127.0.0.1:$FEDWIKI_ONION_PORT default_server;"; echo " server_name $FEDWIKI_ONION_HOSTNAME;"; echo ''; - echo ' add_header X-Robots-Tag none;'; - echo ' add_header X-Download-Options noopen;'; echo ' add_header X-Frame-Options DENY;'; echo ' add_header X-Content-Type-Options nosniff;'; echo ''; @@ -389,6 +381,12 @@ function fedwiki_setup_web { echo ' }'; echo '}'; } >> "$fedwiki_nginx_file" + sed -i '/Content-Security-Policy/d' "$fedwiki_nginx_file" + sed -i '/X-XSS-Protection/d' "$fedwiki_nginx_file" + sed -i '/X-Robots-Tag/d' "$fedwiki_nginx_file" + sed -i '/X-Download-Options/d' "$fedwiki_nginx_file" + sed -i '/X-Permitted-Cross-Domain-Policies/d' "$fedwiki_nginx_file" + function_check create_site_certificate create_site_certificate "$FEDWIKI_DOMAIN_NAME" 'yes'