Fix CORS preflight

This commit is contained in:
luukas 2022-05-26 00:31:58 +03:00
parent 8ce7a96071
commit 47fc398f26
No known key found for this signature in database
GPG Key ID: CC4915E8D71FC044

View File

@ -19,5 +19,12 @@ class BaseApiHandler(BaseHandler):
delete = _unimplemented_method # type: Callable[..., Optional[Awaitable[None]]]
patch = _unimplemented_method # type: Callable[..., Optional[Awaitable[None]]]
put = _unimplemented_method # type: Callable[..., Optional[Awaitable[None]]]
options = _unimplemented_method # type: Callable[..., Optional[Awaitable[None]]]
# }}}
def options(self, *_, **__):
"""
Fix CORS
"""
# no body
self.set_status(204)
self.finish()