Skip to content

CORS headers not returning via uWSGI #1550

@CrazySky2121

Description

@CrazySky2121

Hello! We are using Django app with returning CORS headers.

When we testing it on local env with internal Django wSGIServer, all works fine. Required headers returned.

Example:

Server: WSGIServer/0.2 CPython/3.5.2
Access-Control-Allow-Headers: accept, accept-encoding, authorization, content-type, dnt, origin, user-agent, x-csrftoken, x-requested-with
Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS
Access-Control-Expose-Headers: []
Access-Control-Allow-Credentials: True
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 86400
Content-Type: text/html; charset=utf-8

But when we using Nginx + uWSGI - CORS headers on same request not return.

Instead of required headers, we have only this:

Server: nginx/1.10.0 (Ubuntu)
Date: Wed, 07 Jun 2017 08:31:50 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive

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