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.
Asked
Active
Viewed 951 times
0
-
https://stackoverflow.com/questions/33267383/how-to-configure-x-frame-options-in-django-to-allow-iframe-embedding-of-one-view – Michael Lindsay Dec 22 '20 at 10:30
1 Answers
1
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'

Linh Nguyen
- 3,452
- 4
- 23
- 67