Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

Update wsgi.py #249

Closed
wants to merge 2 commits into from
Closed

Update wsgi.py #249

wants to merge 2 commits into from

Conversation

allanice001
Copy link

Very quick and dirty hack to fix #66

@@ -101,6 +110,9 @@ def __call__(self,
method = environ['REQUEST_METHOD'].upper()
path = environ['SCRIPT_NAME'] + environ['PATH_INFO']
try:
if method == "OPTIONS":
add_cors_headers("200 Ok", [("Content-Type", "text/plain")])
return [b'200 Ok']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Ok/OK

@tomchristie
Copy link
Member

We'll be getting event hooks in #400. No more hacking around to support basic requirements like CORS.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CORS Support
3 participants