Questions tagged «apache2»

1
Magento 2.1.1-通过内容安全策略提高安全性
我的商店可以使用最新版本的Magento(当前为2.1.1)正常运行,并且正在尝试通过Apache 2.4.7(Ubuntu 14.04)上的内容安全策略来提高安全性。我已经从内容页面中删除了所有“ <script>”标记,并创建了单独的files.js。 关于Apache的安全性,我设置了: 标头设置了Content-Security-Policy“ default-src'self'” 但是,它不起作用。Magento本身似乎添加了一些“ <script>”标签。最初的源代码行中的示例: <!doctype html> <html lang =“ pt-BR”> <头> <脚本> var require = { “ baseUrl”:“ http://example.com/pub/static/frontend/Magento/luma/pt_BR ” }; </脚本> 因此在我看来,为了配置CSP,我必须启用“ unsafe-inline”,这毕竟不是真正的安全。 标头设置了Content-Security-Policy“ default-src'self'script-src'self''unsafe-inline''unsafe-eval'”。 有谁知道如何使用CSP正确设置Magento?谢谢!
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.