Forbidden (403) - CSRF verification failed. Request aborted.

瀏覽次數:1,087 次
跳到第一則未讀訊息

Carlos Roberto

未讀,
2022年11月22日 下午6:58:412022/11/22
收件者:Django users
Hi everyone!

I use ngrok to make my projects available in django. I'm having trouble accessing the admin page. After I enter the username and password I get the error 403.

Has anyone had the same problem and could help me?

Regards


Chukwudi Onwusa

未讀,
2022年11月22日 晚上9:03:492022/11/22
收件者:django...@googlegroups.com
Check your template, immediately after the <form> opening tag add  
{% csrf_token %}
If you have it already, kindly check to ensure it's correctly spelt and placed and then restart your server.
Best Regards.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/de5c4738-f540-4596-b1bf-0b0b16aabbf2n%40googlegroups.com.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/de5c4738-f540-4596-b1bf-0b0b16aabbf2n%40googlegroups.com.

Nagaraja Tuticorin

未讀,
2022年11月23日 上午9:22:062022/11/23
收件者:django...@googlegroups.com
Make your database as a public make format of database chmod www-data=www-data ./filename 

Nagaraja Tuticorin

未讀,
2022年11月23日 上午9:22:142022/11/23
收件者:django...@googlegroups.com
Make your database as a public make format of database chmod www-data=www-data ./filename 

Mark Gensler

未讀,
2022年11月25日 上午11:58:592022/11/25
收件者:Django users
Try adding your ngrok domain to the list of CSRF_TRUSTED_ORIGINS: https://docs.djangoproject.com/en/4.1/ref/settings/#csrf-trusted-origins

E.g. assuming you're using https:

CSRF_TRUSTED_ORIGINS = ["https://*.ngrok.io"]
回覆所有人
回覆作者
轉寄
0 則新訊息