Skip to content

Post Request Fail When CSRF_USE_SESSIONS = True #786

@flvyu

Description

@flvyu

When the CSRF_USE_SESSIONS settings variable is set to True post requests can not be made as the request will be rejected. This is because the CSRFTOKEN is not provided, because it will not be stored in a cookie.

Django will end up giving this warning: Forbidden (CSRF token missing or incorrect.):

Currently this issue can be prevented by passing the view to csrf_exempt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions