Skip to content

Allow CORS by handling OPTIONS requests #7

@Anton-2

Description

@Anton-2

When developing a web application connecting to CircuitPython_WSGI, it's practical to have the web server on the host, and make query to Adafruit_CircuitPython_WSGI from the web application.

In such a scenario, non GET requests are forbidden at the browser level if we don't handle CORS and OPTIONS requests.

I've made a few modifications to handle it unconditionally (allowing all types of requests from any host). Is there any security consideration not to do this ?

I'll post a PR for this shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions