V
V
Vova1357982021-08-03 22:17:23
Django
Vova135798, 2021-08-03 22:17:23

Why is it throwing an error when using an iframe?

I want to open the registration page on top of the page using an iframe, but it gives an error:
Refused to display ' 127.0.0.1:8000/register ' in a frame because it set 'X-Frame-Options' to 'DENY'. How can this be fixed?

<iframe src="{% url 'register' %}" width="100%" height="100%"></iframe>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alternativshik, 2021-08-04
@Vova135798

1. You want to do something crazy
2. Everything is detailed here https://docs.djangoproject.com/en/3.2/ref/clickjacking/

S
sochi-russia, 2021-08-03
@sochi-russia

Go to the .htaccessfile in the root of the site and delete this line inside

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question