Skip to content

Commit

Permalink
fix: サブドメイン以外のlocalhostからのリクエストも受け付けられるようにする (#1485)
Browse files Browse the repository at this point in the history
Update middlewares.py
  • Loading branch information
Hiroshiba authored Nov 18, 2024
1 parent bb04a50 commit d8ae0c8
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 @@ -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 = ["*"]
Expand Down

0 comments on commit d8ae0c8

Please sign in to comment.