From 5ab54bf1c79d0e8beb652447e660169af919217c Mon Sep 17 00:00:00 2001 From: geisterfurz007 Date: Fri, 5 Jan 2024 01:13:06 +0100 Subject: [PATCH] fix: ensure https on URL --- packages/cms/src/collections/groupchats.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/cms/src/collections/groupchats.ts b/packages/cms/src/collections/groupchats.ts index 42ee6dd9..9a13964a 100644 --- a/packages/cms/src/collections/groupchats.ts +++ b/packages/cms/src/collections/groupchats.ts @@ -81,6 +81,10 @@ export const Groupchats: CollectionConfig = { return `https://${value}`; } + if (value?.startsWith('http:')) { + return 'https:' + value.substring(4); + } + return value; }, ],