这个问题的原因是由于必须将网站提供者添加到要嵌入iframe的网站的HTTP响应头,才能嵌入iframe。下面是一个Node.js示例代码,可在响应头中添加这个元素:
app.use(function(req, res, next) { res.setHeader('X-Frame-Options', 'ALLOW-FROM https://example.com/'); next(); });
其中,example.com是您要嵌入的网站的网址。这应该解决此错误。
上一篇:BigCommercePHPhelloworldappintsallerror
下一篇:BigCommerce全局上下文变量更新