Skip to content

The position of CorsMiddleware in the middleware stack may not follow recommended ordering. #39

@Polqt

Description

@Polqt

issue (bug_risk): The position of CorsMiddleware in the middleware stack may not follow recommended ordering.

According to django-cors-headers docs, CorsMiddleware should be as high in the stack as possible, typically before CommonMiddleware, so CORS headers are correctly applied to all responses. Here it appears after CommonMiddleware and a custom CSRF-disabling middleware. Please move it above these to match the documented order and avoid subtle CORS issues.

Originally posted by @sourcery-ai[bot] in #38 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions