When I log in to django's admin page using Chrome, the screen doesn't transition for a while after completing the form, and the following error message is displayed. With Microsoft Edge, such an error does not occur. Apparently, it's not the django side, but the Chrome cookie settings.
django=3.0
--Check the csrf token --Chrome developer tools [Ctrl + Shift + i] ⇒ Application ⇒ Check if csrf token exists in Cookies in Storage --Try clearing Chrome cookies --Chrome ⇒ Settings ⇒ Advanced settings ⇒ Privacy and security ⇒ Delete cookies from browsing history data deletion ――If that doesn't work --Privacy and security ⇒ Cookies and site data --Turn on Allowing Sites to Save and Read Cookie Data --Turn on to delete cookies and site data when Chrome is closed
https://qiita.com/UNKCHAN/items/371bf04bbeea1c5e9904 https://stackoverflow.com/questions/29573163/django-admin-login-suddenly-demanding-csrf-token
Recommended Posts