[Question] CSRF verification failed. Request aborted. #76

Closed
opened 2025-12-29 15:31:41 +01:00 by adam · 7 comments
Owner

Originally created by @salt-lick on GitHub (Jun 29, 2016).

Followed the Getting Started and got the frontend to load just fine. Trying to login to the admin area and I'm presented with

Reason given for failure:
Referer checking failed - $mydomainhere:5555/login/?next=/ does not match any trusted origins.

Originally created by @salt-lick on GitHub (Jun 29, 2016). Followed the Getting Started and got the frontend to load just fine. Trying to login to the admin area and I'm presented with Reason given for failure: Referer checking failed - $mydomainhere:5555/login/?next=/ does not match any trusted origins.
adam closed this issue 2025-12-29 15:31:41 +01:00
Author
Owner

@salt-lick commented on GitHub (Jun 29, 2016):

The CSRF token is being created in the form

ex: <input type="hidden" name="csrfmiddlewaretoken" value="Ypyceek9WojBPwdN1rWpQNtKlvO9Qr48">

@salt-lick commented on GitHub (Jun 29, 2016): The CSRF token is being created in the form ex: `<input type="hidden" name="csrfmiddlewaretoken" value="Ypyceek9WojBPwdN1rWpQNtKlvO9Qr48">`
Author
Owner

@salt-lick commented on GitHub (Jun 29, 2016):

Solved:

I was using a custom port and that needed to be in the ALLOWED_HOSTS setting as part of the FSDN.

Thanks for the IRC help.

@salt-lick commented on GitHub (Jun 29, 2016): Solved: I was using a custom port and that needed to be in the ALLOWED_HOSTS setting as part of the FSDN. Thanks for the IRC help.
Author
Owner

@jkldgoefgkljefogeg commented on GitHub (Aug 12, 2016):

I am having this issue when serving https with nginx. Every POST fails with CSRF verification failed

@jkldgoefgkljefogeg commented on GitHub (Aug 12, 2016): I am having this issue when serving https with nginx. Every POST fails with CSRF verification failed
Author
Owner

@rzig commented on GitHub (Jun 14, 2017):

@jkldgoefgkljefogeg did you ever figure out the solution?

@rzig commented on GitHub (Jun 14, 2017): @jkldgoefgkljefogeg did you ever figure out the solution?
Author
Owner

@Eric2XU commented on GitHub (Nov 7, 2017):

I ran into this issue doing reverse proxy via Azure. The trick was to set the server_name in the nginx.conf file to the dns name the clients see not the internal one.

@Eric2XU commented on GitHub (Nov 7, 2017): I ran into this issue doing reverse proxy via Azure. The trick was to set the server_name in the nginx.conf file to the dns name the clients see not the internal one.
Author
Owner

@Dorisnov commented on GitHub (Feb 25, 2019):

I'm having this same issue using RESTer: Can make GET request but not POST requests (CSRF Failed: CSRF token missing or incorrect.) Anyone figured out how to make it work?

@Dorisnov commented on GitHub (Feb 25, 2019): I'm having this same issue using RESTer: Can make GET request but not POST requests (_CSRF Failed: CSRF token missing or incorrect._) Anyone figured out how to make it work?
Author
Owner

@DanSheps commented on GitHub (Feb 25, 2019):

I'm having this same issue using RESTer: Can make GET request but not POST requests (CSRF Failed: CSRF token missing or incorrect.) Anyone figured out how to make it work?

This is not a place for requesting support, please check out the mailing list.

If you have a reproducible bug or a feature request, you can create a new issue here.

@DanSheps commented on GitHub (Feb 25, 2019): > I'm having this same issue using RESTer: Can make GET request but not POST requests (_CSRF Failed: CSRF token missing or incorrect._) Anyone figured out how to make it work? This is not a place for requesting support, please check out the mailing list. If you have a reproducible bug or a feature request, you can create a new issue here.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#76