也许可以这样做,以允许在 Discourse 中运行脚本 @merefield @supermathie?
App.yml:
DISCOURSE_ALLOW_UNSAFE_HTML: true
- volume:
host: /var/discourse/shared/standalone/nginx_custom.conf
guest: /etc/nginx/conf.d/custom.conf
CSP 的 Nginx 配置:
add_header Content-Security-Policy “script-src ‘self’ ‘https://webadress.com’ ‘unsafe-inline’ ‘unsafe-eval’;”
我正在尝试添加 Nginx 配置,但在使用 curl 检查 CSP 时,‘unsafe-inline’ 和 https 都不会显示出来。‘unsafe-eval’ 是通过管理员添加的。
编辑:不安全