From aed745d6f034664b9a87011b9de6530c454c8780 Mon Sep 17 00:00:00 2001 From: sabonerune <102559104+sabonerune@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:27:32 +0900 Subject: [PATCH] =?UTF-8?q?FIX:=20`localhost=5Fregex`=E3=81=ABIPv6?= =?UTF-8?q?=E3=81=AE=E3=83=AB=E3=83=BC=E3=83=97=E3=83=90=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=82=A2=E3=83=89=E3=83=AC=E3=82=B9=E3=82=92=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=20(#1178)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FIX: ipv6のループバックアドレスを追加 --- run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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":