Django page not rendering in Facebook iframe

2019-07-15 17:54发布

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条回答
Animai°情兽
2楼-- · 2019-07-15 18:33

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

查看更多
登录 后发表回答