Skip to content

Commit

Permalink
fix: quote
Browse files Browse the repository at this point in the history
  • Loading branch information
RaoHai committed Nov 22, 2024
1 parent 78c37e4 commit 6352688
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion server/auth/cors_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ async def dispatch(self, request: Request, call_next: Callable[[Request], Awaita
def mutate_cors_headers(self, request: Request, response: Response):
requested_origin = request.headers.get('origin')
headers = response.headers

headers["Access-Control-Allow-Origin"] = requested_origin
return headers
6 changes: 3 additions & 3 deletions server/auth/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
]

ANONYMOUS_USER_ALLOW_LIST = [
"/api/auth/userinfo"
"/api/auth/userinfo",
"/api/chat/qa",
"/api/chat/stream_qa",
]
Expand Down Expand Up @@ -53,8 +53,8 @@ async def oauth(self, request: Request):

async def dispatch(self, request: Request, call_next: Callable[[Request], Awaitable[Response]]) -> Response:
try:
if ENVRIMENT == "development":
return await call_next(request)
# if ENVRIMENT == "development":

Check warning on line 56 in server/auth/middleware.py

View check run for this annotation

Codecov / codecov/patch

server/auth/middleware.py#L56

Added line #L56 was not covered by tests
# return await call_next(request)

# Auth 相关的直接放过
if request.url.path.startswith("/api/auth"):
Expand Down

0 comments on commit 6352688

Please sign in to comment.