Alex Santos
Alex Santos

Reputation: 325

Django page not rendering in 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.

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,

Upvotes: 3

Views: 3243

Answers (1)

Alex Santos
Alex Santos

Reputation: 325

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

Upvotes: 6

Related Questions