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 = ["*"]