Fix media repo breaking (#5593)

This commit is contained in:
Amber Brown 2019-07-03 04:01:28 +10:00 committed by Richard van der Hoff
parent f8b52eb8c5
commit 0ee9076ffe
6 changed files with 60 additions and 26 deletions

View file

@ -95,6 +95,7 @@ class PreviewUrlResource(DirectServeResource):
)
def render_OPTIONS(self, request):
request.setHeader(b"Allow", b"OPTIONS, GET")
return respond_with_json(request, 200, {}, send_cors=True)
@wrap_json_request_handler