gpt4 book ai didi

content-security-policy - 指定任何域时出现“无法识别的Content-Security-Policy指令”错误

转载 作者:行者123 更新时间:2023-12-02 05:59:37 24 4
gpt4 key购买 nike

我已经阅读了Content Security Policy docs,并为我的图像源添加了条目。我的值与文档中的示例匹配,但Chrome提示这些值无效:

Unrecognized Content-Security-Policy directive 'pbs.twimg.com'.
Unrecognized Content-Security-Policy directive 'https://pbs.twimg.com'.

header 是:
Content-Security-Policy-Report-Only:default-src 'self' 'unsafe-inline' 'unsafe-eval' mycompany.com *.typekit.net *.stripe.com *.mxpnl.com *.twitter.com;img-src 'self' data:; pbs.twimg.com;font-src fonts.googleapis.com fonts.gstatic.com *.typekit.net;report-uri /csp-violation

最佳答案

您在data:之后和pbs.twimg.com之前有一个分号,因此pbs.twimg.com被视为指令名称而不是指令值的一部分。

关于content-security-policy - 指定任何域时出现“无法识别的Content-Security-Policy指令”错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31676720/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com