Abdul Aouwal
Abdul Aouwal

Reputation: 1

How to allow Iframe to other website from Django Website?

I am new to Django. I have launched a new site with Django. I wish people can iframe my site. But when doing I frame, It shows Site Refused to connect. . As a newbie, I don’t have any idea what to do now. Would you please suggest me.

Upvotes: 0

Views: 1741

Answers (1)

Linh Nguyen
Linh Nguyen

Reputation: 3910

Django 3.0(https://docs.djangoproject.com/en/3.1/releases/3.0/#security) update disabled X_FRAME_OPTIONS to DENY in settings.py. You can add the domain you want to show iframe in

X_FRAME_OPTIONS = 'SAMEORIGIN'

Upvotes: 1

Related Questions