Django page not rendering in Facebook iframe

随声附和 提交于 2019-12-23 23:37:05

问题


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.

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

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

Any help will be appreciated.

Thanks in advance,


回答1:


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

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



来源:https://stackoverflow.com/questions/20506774/django-page-not-rendering-in-facebook-iframe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!