浏览代码

When ssl is enabled only allow https content within the site

Bob Mottram 8 年前
父节点
当前提交
5a12545657
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1
    0
      src/freedombone-utils-web

+ 1
- 0
src/freedombone-utils-web 查看文件

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