Skip to content

Commit 3d1ee3f

Browse files
committed
fix(sync): remove escapes of / in regex
We will be using them with new RegExp and not as Regex Literals, so we don't need to escape them.
1 parent 7fa1b65 commit 3d1ee3f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

__meta/synchronizer/synchronizer/services/secrets_synchronizer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,20 +191,20 @@ def get_multi_apps_secret(
191191

192192
# Allow any https prefix
193193
# Note that we need the
194-
https_origin_prefix = r"^https:\/\/([a-z0-9-]+\.)*"
194+
https_origin_prefix = r"^https://([a-z0-9-]+\.)*"
195195

196196
# Populate the allowed origins regex
197197
match env:
198198
case "local":
199199
# Allow all origins for local development
200-
server_secret["ALLOWED_ORIGINS_REGEX"] = r"^https?:\/\/localhost:\d{4}$"
200+
server_secret["ALLOWED_ORIGINS_REGEX"] = r"^https?://localhost:\d{4}$"
201201
case "dev":
202202
# Allow all ScottyLabs dev subdomains and any vercel preview domains
203203
# (https://<team-slug>-<random 9 characters>-scottylabs.vercel.app)
204204
# for dev development
205205
server_secret["ALLOWED_ORIGINS_REGEX"] = (
206206
rf"{https_origin_prefix}slabs-dev\.org$,"
207-
rf"^https:\/\/{team_slug}-[0-9a-z]{{9}}-scottylabs\.vercel\.app$"
207+
rf"^https://{team_slug}-[0-9a-z]{{9}}-scottylabs\.vercel\.app$"
208208
)
209209
case "staging":
210210
# Allow all ScottyLabs staging subdomains for staging development

0 commit comments

Comments
 (0)