CSRF Referer checking failed Django 1.8
Asked Answered
T

1

6

I have searched about this but could not find any workable solution.

I have a website like www.example.com and subdomains a.example.com and b.example.com. When I try to post a request from a.example.com to b.example.com I get the error of Referer checking failed.

I have following settings in a.example.com and b.example.com:

CSRF_COOKIE_DOMAIN = ".example.com"

But I am not able to make use of CSRF_COOKIE_DOMAIN correctly.

Trim answered 8/7, 2015 at 12:27 Comment(0)
S
1

Django 1.8 has strict referer checking for HTTPS. You cannot post from a.example.com to b.example.com with CSRF protection enabled in Django 1.8.

With Django 1.9 they added CSRF trusted origins.

Salpingectomy answered 5/7, 2016 at 16:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.