From 01227aaefe7363848d38cfcceca05e83366d3319 Mon Sep 17 00:00:00 2001 From: Simon VDB Date: Thu, 9 Nov 2023 23:33:16 +0100 Subject: [PATCH] fix httpStorage `allowAllDomains` config param (#189) --- src/storage/http.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/storage/http.ts b/src/storage/http.ts index 503c855..e1845bc 100644 --- a/src/storage/http.ts +++ b/src/storage/http.ts @@ -14,7 +14,8 @@ export type HTTPStorageOptions = { const HTTP_RE = /^https?:\/\//; export function ipxHttpStorage(_options: HTTPStorageOptions = {}): IPXStorage { - const allowAllDomains = getEnv("IPX_HTTP_ALLOW_ALL_DOMAINS") ?? false; + const allowAllDomains = + _options.allowAllDomains ?? getEnv("IPX_HTTP_ALLOW_ALL_DOMAINS") ?? false; let _domains = _options.domains || getEnv("IPX_HTTP_DOMAINS") || []; const defaultMaxAge =