我试图隐藏(而不是删除)CSP(Content-Security-Policy)标头中的域如果删除它们,CSP将阻止来自它们的请求,我需要隐藏它们,以使用户无法在F12 netowrk窗口中看到域,这可能吗?
<httpProtocol>
<customHeaders>
<add name="Content-Security-Policy"
value="default-src 'self' https://google.com/; style-src 'self'
'unsafe-inline' https://google.com/; font-src 'self'
data: https://google.com/; script-src 'self'
https://google.com/ 'unsafe-eval'; object-src
'self' https://google.com/" />
</customHeaders>
</httpProtocol>
标头(无论是HTTP还是HTML Meta)都需要发送。如果已发送,则可以读取。所以不,这是不可能的。唯一的选择是设置一个非常宽松的策略,该策略允许任何操作(我不建议这样做)。