8

.htacces ファイルに次の行を追加しました。

Content-Security-Policy: default-src 'self'
X-Content-Security-Policy: default-src 'self'
X-WebKit-CSP: default-src 'self'

しかし、私は常に次のエラーを受け取りました:

Invalid command 'Content-Security-Policy:', perhaps misspelled or defined by a module not included in the server configuration

理解できません。どの Apache モジュールを有効にする必要がありますか? これらの行の何が問題になっていますか?

Thx、デビッド

4

2 に答える 2

1

私は Apache の専門家ではありませんが、コンテンツ セキュリティ ポリシーは応答ヘッダーです。http://httpd.apache.org/docs/2.2/mod/mod_headers.html

于 2013-05-06T16:02:24.150 に答える