From f16e874f315767df5fa4a9983f33e67e5ba1e41b Mon Sep 17 00:00:00 2001 From: tobias Date: Sat, 6 Jul 2024 22:11:46 +0200 Subject: [PATCH] Remove baseURL from preview url --- payload.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/payload.config.ts b/payload.config.ts index 65cade6..baeb86a 100644 --- a/payload.config.ts +++ b/payload.config.ts @@ -43,7 +43,7 @@ export default buildConfig({ }, livePreview: { url: ({ data, locale, collectionConfig }) => - `${process.env.BASE_URL}/${collectionConfig?.slug || ''}/preview${data.path}${ + `${collectionConfig?.slug || ''}/preview${data.path}${ locale ? `?locale=${locale.code}` : '' }`, collections: [COLLECTION_SLUG_PAGE, COLLECTION_SLUG_POST],