Django页面不会在Facebook中呈现iframe [英] Django page not rendering in Facebook iframe

查看:151
本文介绍了Django页面不会在Facebook中呈现iframe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试显示此django页面( https://www.mm.viance .com.ec / cupones / )在Facebook的iframe中,我正在空白页面。

i'm trying to show this django page (https://www.mm.viance.com.ec/cupones/) in a Facebook iframe and I'm getting a blank page.

我尝试获得SSL证书,没有不工作我也尝试绕过de csrf_token保护。

I tried getting an SSL certificate, and it didn't work. I also tried bypassing de csrf_token protection.

该页面在浏览器中呈现正常,但不在Facebook iframe内。

The page renders just fine in a browser, but not inside the Facebook iframe.

任何帮助将不胜感激。

提前感谢

推荐答案

Django使用'django.middleware.clickjacking.XFrameOptionsMiddleware'进行Clickjacking保护。

Django uses Clickjacking protection with 'django.middleware.clickjacking.XFrameOptionsMiddleware'.

为了让网站嵌入到iframe中,只需从设置中删除该中间件.py

To allow the site to be embedded in an iframe just erase that middleware from settings.py

https://docs.djangoproject.com/en/dev/ref/clickjacking/#clickjacking-prevention

这篇关于Django页面不会在Facebook中呈现iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆