Skip to content

Commit

Permalink
fix regex mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
xgui3783 committed Apr 3, 2024
1 parent 695ac73 commit 2614def
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/siibra_api_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class CELERY_CONFIG:
remapped_providers = os.getenv("SIIBRA_API_REMAP_PROVIDERS")
if remapped_providers:
for mapping in remapped_providers.split("\n"):
regex_string = r"^(?P<from_host>(https?://)?[\w0-9./]+(:[0-9]+)?):(?P<to_host>(https?://)?[\w0-9./]+(:[0-9]+)?)$"
regex_string = r"^(?P<from_host>(https?://)?[\w0-9./-]+(:[0-9]+)?):(?P<to_host>(https?://)?[\w0-9./-]+(:[0-9]+)?)$"
match = re.match(regex_string, mapping)
assert match
SIIBRA_API_REMAP_PROVIDERS[match.group("from_host")] = match.group("to_host")
Expand Down

0 comments on commit 2614def

Please sign in to comment.