Fix handling of preflight requests

Pre-flighted OPTIONS requests do not include authentication information,
which means that we should not expect these to be authenticated.
Authentication will be validated when the real PUT/POST etc request is
issued after the preflight.
This commit is contained in:
Carl Hultquist 2016-04-08 11:18:50 -04:00
parent 6b220c949b
commit 4a161fea12

View File

@ -387,7 +387,6 @@ class APIHandler(IPythonHandler):
self.set_header('Content-Type', 'application/json')
return super(APIHandler, self).finish(*args, **kwargs)
@web.authenticated
def options(self, *args, **kwargs):
self.set_header('Access-Control-Allow-Headers', 'accept, content-type')
self.set_header('Access-Control-Allow-Methods',