When qvitter is enabled disable the content security policy, because otherwise you can't change the profile photo

This commit is contained in:
Bob Mottram 2018-03-06 14:48:56 +00:00
parent 02ec8d5c30
commit a0135ca512
1 changed files with 5 additions and 0 deletions

View File

@ -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