From 7992691d947589682575597e394b67140e0d1ad1 Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Mon, 12 Aug 2024 17:31:29 -0500 Subject: [PATCH] api: Make knownOrigins parsing logic more robust. --- api/src/hff_entry_forms_api.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/hff_entry_forms_api.nim b/api/src/hff_entry_forms_api.nim index 6ee6e1e..1b2ae35 100644 --- a/api/src/hff_entry_forms_api.nim +++ b/api/src/hff_entry_forms_api.nim @@ -30,7 +30,7 @@ proc loadConfig(args: Table[string, docopt.Value]): HffEntryFormsApiConfig = debug: cfg.hasKey("debug") and cfg.getVal("debug") == "true", eventParentId: cfg.getVal("event-parent-id"), integrationToken: cfg.getVal("integration-token"), - knownOrigins: cfg.getVal("known-origins")[1..^2].split(',').mapIt(it[1..^2]), + knownOrigins: cfg.getVal("known-origins")[1..^2].split(',').mapIt(it.strip[1..^2]), notionApiBaseUrl: cfg.getVal("notion-api-base-url"), notionVersion: cfg.getVal("notion-version"), notionConfigDbId: cfg.getVal("notion-config-db-id"),