不会加载以子域为目标的 iframe。
Iframe with subdomain as target won't load.
我一直在尝试将 iframe 加载到我的网站,但它不起作用,Chrome 控制台显示此错误消息:
Refused to display 'https://viewtrip.travelport.com/#!/itinerary?loc=xxx' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors https://viewtripnextgen-api.travelport.com".
我也尝试添加 https://viewtripnextgen-api.travelport.com
作为框架祖先,但没有任何区别。我真的不知道如何解决这个问题。
该错误消息意味着,如果您的 <iframe>
标记出现在 URL https://viewtripnextgen-api.travelport.com
.
I also tried to add https://viewtripnextgen-api.travelport.com as frame ancestor
唯一的方法是 运行 travelport.com
网站。
唯一的其他选择是更改 https://viewtrip.travelport.com
的 CSP,只有 运行 travelport.com
网站也可以这样做。
作为想要将其他人的内容放入您的 iframe 的第三方,如果他们拒绝(他们确实拒绝),那么您将无法做到。
我一直在尝试将 iframe 加载到我的网站,但它不起作用,Chrome 控制台显示此错误消息:
Refused to display 'https://viewtrip.travelport.com/#!/itinerary?loc=xxx' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors https://viewtripnextgen-api.travelport.com".
我也尝试添加 https://viewtripnextgen-api.travelport.com
作为框架祖先,但没有任何区别。我真的不知道如何解决这个问题。
该错误消息意味着,如果您的 <iframe>
标记出现在 URL https://viewtripnextgen-api.travelport.com
.
I also tried to add https://viewtripnextgen-api.travelport.com as frame ancestor
唯一的方法是 运行 travelport.com
网站。
唯一的其他选择是更改 https://viewtrip.travelport.com
的 CSP,只有 运行 travelport.com
网站也可以这样做。
作为想要将其他人的内容放入您的 iframe 的第三方,如果他们拒绝(他们确实拒绝),那么您将无法做到。