diff --git a/run.py b/run.py index 182e66061..85c2f71ab 100644 --- a/run.py +++ b/run.py @@ -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":