Security CSP url方案http://matches if resource';s方案为http://或https://
让我们看一下框架。假设我想允许Security CSP url方案http://matches if resource';s方案为http://或https://,security,iframe,specifications,content-security-policy,Security,Iframe,Specifications,Content Security Policy,让我们看一下框架。假设我想允许http://*.parent.com在https://child.com和http://child.com: frame-ancestors http://*.parent.com 如果我设置https://*.parent.com我们有一个明显的违规行为 如果我设置frame祖先*.parent.com,则https://child.com 如果我设置了框架祖先http://*.parent.com,它对这两种情况都有效。为什么? 引述: 如果源表达式的方案部
http://*.parent.com
在https://child.com
和http://child.com
:
frame-ancestors http://*.parent.com
frame祖先*.parent.com
,则https://child.com
框架祖先http://*.parent.com
,它对这两种情况都有效。为什么?https://child.com据我所知,
与HTTP不匹配。但是为什么案例3适用于
https://child.com
?根据条件4,它应该失败,因为http://*.parent.com
与https://child.com
。我缺少什么?目标
允许http://*.parent.com
在两个https://child.com
和http://child.com
案例3
child.com上的CSP策略
:
frame-ancestors http://*.parent.com
但为什么案例3适用于其他公司
如果您浏览到,例如http://1.parent.com
,其中包含一些child.com
内容,例如:
<iframe src="https://child.com/mycontent">