Fix devserver script misprocessing in some situations where auth-host was being used. Deduplicate origins on server end.

This commit is contained in:
2025-12-10 17:39:09 +00:00
parent 3f0de04a49
commit a8ffd629ff
2 changed files with 25 additions and 34 deletions
+5 -1
View File
@@ -185,9 +185,13 @@ def main():
# If origins are configured, ensure auth_host is included at top
if origins:
# Insert auth_host at the beginning (Passkey.__init__ will dedupe)
# Insert auth_host at the beginning
origins.insert(0, args.auth_host)
# Remove duplicates while preserving order
seen = set()
origins = [x for x in origins if not (x in seen or seen.add(x))]
# Compute site_url and site_path for reset links
# Priority: auth_host > first origin with localhost > http://localhost:port
if args.auth_host: