Visit the Community Forum to learn more and ask any questions you have!

can't log in as admin (CSRF forbidden)

Back to Thread List

I'm trying to log in to the admin section with a new project but I keep getting this error:

Forbidden (Origin checking failed)

I created an admin user earlier so I don't think that's the problem.

Please help!

by safienz on Aug. 13, 2024, 10:52 a.m.

Replies

  • Hi there!

    This is probably due to the CSRF_TRUSTED_ORIGINS setting.

    If you open your settings.py and look for that variable, you should see a list as its value. Copy the URL given to your project and add it to this list.

    Here's an example from one of my test projects:

    CSRF_TRUSTED_ORIGINS = ["https://6ro-tenacious-raman.circumeo-apps.net"]

    Be sure to substitute your own URL. Hope that helps!

    by zach on Aug. 13, 2024, 11:18 a.m.
Reply to this thread