diff --git a/src/freedombone-utils-gnusocialtools b/src/freedombone-utils-gnusocialtools index c6791d46..10707042 100755 --- a/src/freedombone-utils-gnusocialtools +++ b/src/freedombone-utils-gnusocialtools @@ -750,6 +750,7 @@ function gnusocial_use_classic { if [ -f "/etc/nginx/sites-available/$domain_name" ]; then sed -i 's|index_qvitter.php|index.php|g' "/etc/nginx/sites-available/$domain_name" sed -i 's|index.html|index.php|g' "/etc/nginx/sites-available/$domain_name" + sed -i 's|#add_header Content-Security-Policy|add_header Content-Security-Policy|g' "/etc/nginx/sites-available/$domain_name" fi if ! grep -q "//addPlugin('Qvitter')" "/var/www/$domain_name/htdocs/config.php"; then @@ -774,6 +775,9 @@ function gnusocial_use_qvitter { if [ -f "/etc/nginx/sites-available/$domain_name" ]; then sed -i 's|index_qvitter.php|index.php|g' "/etc/nginx/sites-available/$domain_name" sed -i 's|index.html|index.php|g' "/etc/nginx/sites-available/$domain_name" + if ! grep -q "#add_header Content-Security-Policy" "/etc/nginx/sites-available/$domain_name"; then + sed -i 's|add_header Content-Security-Policy|#add_header Content-Security-Policy|g' "/etc/nginx/sites-available/$domain_name" + fi fi if grep -q "//addPlugin('Qvitter')" "/var/www/$domain_name/htdocs/config.php"; then @@ -805,6 +809,7 @@ function gnusocial_use_pleroma { if [ -f "/etc/nginx/sites-available/$domain_name" ]; then sed -i 's|index.php|index_qvitter.php|g' "/etc/nginx/sites-available/$domain_name" sed -i 's|index index_qvitter.php|index index.html|g' "/etc/nginx/sites-available/$domain_name" + sed -i 's|#add_header Content-Security-Policy|add_header Content-Security-Policy|g' "/etc/nginx/sites-available/$domain_name" fi if grep -q "//addPlugin('Qvitter')" "/var/www/$domain_name/htdocs/config.php"; then