Skip to content
Snippets Groups Projects
Commit 4add1c70 authored by Erik Johnston's avatar Erik Johnston
Browse files

Just say yes to OPTIONS requests, since we want to turn on CORS headers for all paths

parent f99168de
No related branches found
No related tags found
No related merge requests found
...@@ -96,6 +96,11 @@ class TwistedHttpServer(HttpServer, resource.Resource): ...@@ -96,6 +96,11 @@ class TwistedHttpServer(HttpServer, resource.Resource):
path. path.
""" """
try: try:
# Just say yes to OPTIONS.
if request.method == "OPTIONS":
self._send_response(request, 200, {})
return
# Loop through all the registered callbacks to check if the method # Loop through all the registered callbacks to check if the method
# and path regex match # and path regex match
for path_entry in self.path_regexs.get(request.method, []): for path_entry in self.path_regexs.get(request.method, []):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment