0
我想使用Content-Security-Policy並嘗試添加到我的.htaccess中。內容安全策略未運行.htaccess
問題:我用chrome插件檢查是CSP正在運行但未找到。
<IfModule mod_headers.c>
Header set Content-Security-Policy "default-src 'self' *.facebook.com;frame-ancestors 'self' *.facebook.com;script-src 'strict-dynamic' 'nonce-rAnd0m123' 'unsafe-inline' http: https:;base-uri 'none';object-src 'none';"
</IfModule>
###DEFLATE###
<ifModule mod_deflate.c>
<filesMatch "\.(css|js|x?html?|php)$">
SetOutputFilter DEFLATE
</filesMatch>
</ifModule>
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/jpg "access plus 60 days"
</IfModule>