Safari 11.0の使用私が維持しているWebサイトにCSSリソースを読み込もうとしてエラーが発生しました。ページはChromeとFirefoxで正常に読み込まれ、Safariで正常に読み込まれるため、解決方法がわかりません。私はContent-Security-Policy
ヘッダーを変更する必要があると思います。コンテンツセキュリティポリシーstyle-srcがSafariで読み込みを拒否します
Safariコンソールの特定のエラーはRefused to load https://****.com/css/styles.css because it does not appear in the style-src directive of the Content Security Policy.
です。この結果、styles.css
ファイルがロードされず、Webサイトが正しく表示されません。
(キャディを介して設定された)Webサイトのセキュリティヘッダは、次のとおりとなるよう
Content-Security-Policy default-src 'self' https:; script-src 'self'; style-src 'self'; object-src 'none' Content-Type text/html; charset=utf-8 Referrer-Policy strict-origin Server Caddy Strict-Transport-Security max-age=31536000; includeSubDomains; preload