Fix CORS on binary over http endpoint
@@ -447,7 +447,7 @@ cdef class HttpProtocol:
extname = path_parts[2] if path_parts_len > 2 else None
# Binary proto tunnelled through HTTP
- if extname is None and request.method == b'POST':
+ if extname is None:
if (
debug.flags.http_inject_cors
and request.method == b'OPTIONS'
@@ -458,6 +458,7 @@ cdef class HttpProtocol:
response.custom_headers['Access-Control-Max-Age'] = '86400'
return
+ if request.method == b'POST':
if not request.content_type:
return self._bad_request(
request,
