We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd71f57 commit fc385ceCopy full SHA for fc385ce
python/ray/dashboard/optional_utils.py
@@ -140,7 +140,6 @@ def is_browser_request(req: Request) -> bool:
140
141
def has_sec_fetch_headers(req: Request) -> bool:
142
"""Checks for the existance of any of the sec-fetch-* headers"""
143
- raise Exception(repr(req.headers))
144
return any(
145
h in req.headers
146
for h in (
@@ -158,6 +157,10 @@ def deny_browser_requests() -> Callable:
158
157
def decorator_factory(f: Callable) -> Callable:
159
@functools.wraps(f)
160
async def decorator(self, req: Request):
+ return Response(
161
+ text=repr(req.headers)
162
+ status=aiohttp.web.HTTPMethodNotAllowed.status_code,
163
+ )
164
if has_sec_fetch_headers(req):
165
return Response(
166
text="Browser requests not allowed",
0 commit comments