Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Security 内容安全策略拒绝连接到_Security_Http Headers_Content Security Policy - Fatal编程技术网

Security 内容安全策略拒绝连接到

Security 内容安全策略拒绝连接到,security,http-headers,content-security-policy,Security,Http Headers,Content Security Policy,拒绝连接到 '' 因为它违反了以下内容安全策略指令: “默认src'unsafe inline''unsafe eval'self'*.googleapis.com *.google-analytics.com*.gstatic.com*.googletagmanager.com aaa.dev.someplace.com*.test.ldxxx.net*.testauto.ldxxx.net w1xx.ldxxx.net aaa.xxz.ldxxx.net aaa.test.someplace

拒绝连接到 '' 因为它违反了以下内容安全策略指令: “默认src'unsafe inline''unsafe eval'self'*.googleapis.com *.google-analytics.com*.gstatic.com*.googletagmanager.com aaa.dev.someplace.com*.test.ldxxx.net*.testauto.ldxxx.net w1xx.ldxxx.net aaa.xxz.ldxxx.net aaa.test.someplace.com aaa.staging.aaac.net aaa.yyy.ddd.as.nz”。请注意,“connect src”是 未明确设置,因此“默认src”用作回退

记住,我已经屏蔽了URL,以免泄露敏感信息

我的确切内容安全策略http头在引用的错误文本中。错误说明:

https://w1xxx.ldxxx.net:7031/direct/v1609/something?preview=FALSE

违反我的内容安全策略。但是为什么呢?不应该
https://w1xxx.ldxxx.net:7031/direct/v1609/something?preview=FALSE
由于我的内容安全策略中的
w1xx.ldxxx.net
,允许连接到?

定义策略的页面的URL是什么,在哪里发生此冲突

如果端口7031上未提供此页面,则必须在策略中指定
w1xx.ldxxx.net:7031
作为主机条目

根据,如果未指定端口,则默认为URL方案中的端口(默认HTTPS使用443)

如果表达式不包含端口部分,并且url的端口不是 url方案的默认端口,返回“不匹配”


该页面在端口7031上提供。解决方案是
https://w1xxx.ldxxx.net:7031
。必须指定端口,端口后不指定任何内容。根据您的回答,我不需要指定端口,因为主机位于端口7031上,我们正在呼叫要连接的web服务器也位于端口7031上。