From d8ae0c80fce9d37b52b029e30d00724e154edad5 Mon Sep 17 00:00:00 2001 From: Hiroshiba Date: Mon, 18 Nov 2024 17:05:08 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=82=B5=E3=83=96=E3=83=89=E3=83=A1?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E4=BB=A5=E5=A4=96=E3=81=AElocalhost=E3=81=8B?= =?UTF-8?q?=E3=82=89=E3=81=AE=E3=83=AA=E3=82=AF=E3=82=A8=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=82=82=E5=8F=97=E3=81=91=E4=BB=98=E3=81=91=E3=82=89=E3=82=8C?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B=20(#1485?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update middlewares.py --- voicevox_engine/app/middlewares.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voicevox_engine/app/middlewares.py b/voicevox_engine/app/middlewares.py index 14fd9e1f2..a26423464 100644 --- a/voicevox_engine/app/middlewares.py +++ b/voicevox_engine/app/middlewares.py @@ -29,7 +29,7 @@ async def global_execution_handler(request: Request, exc: Exception) -> Response # CORS用のヘッダを生成するミドルウェア localhost_regex = ( - r"^[a-zA-Z+\-\.]+://(([^/]+\.)localhost|127\.0\.0\.1|\[::1\])(:[0-9]+)?$" + r"^[a-zA-Z+\-\.]+://(([^/]+\.)?localhost|127\.0\.0\.1|\[::1\])(:[0-9]+)?$" ) compiled_localhost_regex = re.compile(localhost_regex) allowed_origins = ["*"]