Skip to content

Commit fc385ce

Browse files
bigger shotgun
1 parent fd71f57 commit fc385ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/ray/dashboard/optional_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ def is_browser_request(req: Request) -> bool:
140140

141141
def has_sec_fetch_headers(req: Request) -> bool:
142142
"""Checks for the existance of any of the sec-fetch-* headers"""
143-
raise Exception(repr(req.headers))
144143
return any(
145144
h in req.headers
146145
for h in (
@@ -158,6 +157,10 @@ def deny_browser_requests() -> Callable:
158157
def decorator_factory(f: Callable) -> Callable:
159158
@functools.wraps(f)
160159
async def decorator(self, req: Request):
160+
return Response(
161+
text=repr(req.headers)
162+
status=aiohttp.web.HTTPMethodNotAllowed.status_code,
163+
)
161164
if has_sec_fetch_headers(req):
162165
return Response(
163166
text="Browser requests not allowed",

0 commit comments

Comments
 (0)