Browse Source

When ssl is enabled only allow https content within the site

Bob Mottram 8 years ago
parent
commit
5a12545657
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      src/freedombone-utils-web

+ 1
- 0
src/freedombone-utils-web View File

@@ -134,6 +134,7 @@ function nginx_ssl {
134 134
     echo '    ssl_prefer_server_ciphers on;' >> $filename
135 135
     echo "    ssl_protocols $SSL_PROTOCOLS;" >> $filename
136 136
     echo "    ssl_ciphers '$SSL_CIPHERS';" >> $filename
137
+    echo "    add_header Content-Security-Policy \"default-src https:; script-src https: 'unsafe-inline'; style-src https: 'unsafe-inline'\";" >> $filename
137 138
     #nginx_stapling $1
138 139
 }
139 140