Skip to content

Commit

Permalink
FIX: localhost_regexにIPv6のループバックアドレスを追加 (#1178)
Browse files Browse the repository at this point in the history
FIX: ipv6のループバックアドレスを追加
  • Loading branch information
sabonerune authored Apr 30, 2024
1 parent 7460e96 commit aed745d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ async def global_execution_handler(request: Request, exc: Exception) -> Response
app.add_middleware(ServerErrorMiddleware, handler=global_execution_handler)

# CORS用のヘッダを生成するミドルウェア
localhost_regex = "^https?://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?$"
localhost_regex = "^https?://(localhost|127\\.0\\.0\\.1|\\[::1\\])(:[0-9]+)?$"
compiled_localhost_regex = re.compile(localhost_regex)
allowed_origins = ["*"]
if cors_policy_mode == "localapps":
Expand Down

0 comments on commit aed745d

Please sign in to comment.