Skip to content

Commit

Permalink
settings: include URL_PREFIX in CORS_URLS_REGEX
Browse files Browse the repository at this point in the history
Fixes #11389
  • Loading branch information
nijel committed Apr 11, 2024
1 parent b94e032 commit 0317fc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion weblate/settings_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@

# CORS allowed origins
CORS_ALLOWED_ORIGINS = get_env_list("WEBLATE_CORS_ALLOWED_ORIGINS")
CORS_URLS_REGEX = r"^/api/.*$"
CORS_URLS_REGEX = rf"^{URL_PREFIX}/api/.*$"

# Database backup type
DATABASE_BACKUP = get_env_str("WEBLATE_DATABASE_BACKUP", "plain")
Expand Down
1 change: 1 addition & 0 deletions weblate/settings_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,7 @@
# CORS allowed origins
CORS_ALLOWED_ORIGINS = []
CORS_URLS_REGEX = r"^/api/.*$"
CORS_URLS_REGEX = rf"^{URL_PREFIX}/api/.*$"

# Enable plain database backups
DATABASE_BACKUP = "plain"
Expand Down

0 comments on commit 0317fc4

Please sign in to comment.