Skip to content

Commit

Permalink
Fix: http://localhost:5173 からの HTTP アクセスが CORS エラーで遮断される問題を修正
Browse files Browse the repository at this point in the history
VOICEVOX ENGINE 側での正規表現の変更によるデグレが原因だった…
  • Loading branch information
tsukumijima committed Nov 8, 2024
1 parent 28f150b commit a5b2d3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion voicevox_engine/app/middlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,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 = ["*"]
Expand Down

0 comments on commit a5b2d3e

Please sign in to comment.