I have two applications running on the same domain on different ports, both using csrf middleware.
When I log-in in one of the applications all POST
submits from the other fail.
I presume because the SESSION_COOKIE_DOMAIN
is the same.
I tried changing SESSION_COOKIE_NAME
, however, the 'csrftoken'
cookie is used in the forms POST
request on both sites, no matter that there now is a new cookie with the name I specified.
When I post information with AJAX and get the csrf token from the cookie with the new name - it works, however, form submits fail with CSRF verification failed.