iFrame 不想显示
iFrame don't want to display
我有 2 个站点:
- drupal 网站
- magento 网站
在我的 drupal 网站中,我想显示我的 magento 网站的 iFrame,但这让我出错:
Refused to display 'https://magento_site.com?_redirect_url=https://drupal_site.com' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors https://drupal_site.com https://magento_site.com".
我看到这种错误是显示的网站的问题,不允许其他网站显示它。
我怎么能允许这样做?我需要如何修改才能使其正常工作?
谢谢!
这个问题是因为Content-Security-Policy,所以你可以通过安装Content-Security-Policy模块
来解决它
Configure a Content-Security-Policy header for your Drupal site.
Features
Integrates with Drupal's Libraries API to automatically generate a policy for your site
Up-to-date with the latest CSP Level 3 Working Draft
Policy is automatically optimized to remove duplicate directives and reduce header length
Integration with Reporting module for local policy violation logging
Integration with Report-URI.com for remote policy violation logging
我有 2 个站点:
- drupal 网站
- magento 网站
在我的 drupal 网站中,我想显示我的 magento 网站的 iFrame,但这让我出错:
Refused to display 'https://magento_site.com?_redirect_url=https://drupal_site.com' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors https://drupal_site.com https://magento_site.com".
我看到这种错误是显示的网站的问题,不允许其他网站显示它。
我怎么能允许这样做?我需要如何修改才能使其正常工作?
谢谢!
这个问题是因为Content-Security-Policy,所以你可以通过安装Content-Security-Policy模块
来解决它Configure a Content-Security-Policy header for your Drupal site. Features Integrates with Drupal's Libraries API to automatically generate a policy for your site Up-to-date with the latest CSP Level 3 Working Draft Policy is automatically optimized to remove duplicate directives and reduce header length Integration with Reporting module for local policy violation logging Integration with Report-URI.com for remote policy violation logging