From 6b5016b0288f29c9ab483c6b93454be1d5c461a8 Mon Sep 17 00:00:00 2001 From: Alexandru Teodor Date: Wed, 28 Feb 2024 19:52:48 +0200 Subject: [PATCH] fix: LDP-2357: Keep session cookies when using exposeAPIRouteRules (#199) * fix: LDP-2357: Fix the local tasks when using exposeAPIRouteRules * LDP-2357: Add dist * Revert "LDP-2357: Add dist" This reverts commit c546916221f0ee8728b15a2c7f68b6713c4d34c8. --- src/runtime/server/api/drupalCe.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/runtime/server/api/drupalCe.ts b/src/runtime/server/api/drupalCe.ts index c524d806..3a535ed1 100644 --- a/src/runtime/server/api/drupalCe.ts +++ b/src/runtime/server/api/drupalCe.ts @@ -6,5 +6,7 @@ export default defineEventHandler(async (event) => { const path = params ? '/' + params : '' const drupalCe = useRuntimeConfig().public.drupalCe const drupalUrl = (drupalCe.serverDrupalBaseUrl || drupalCe.drupalBaseUrl) + drupalCe.ceApiEndpoint + // Remove x-forwarded-proto header as it causes issues with the request. + delete event.req.headers['x-forwarded-proto'] return await proxyRequest(event, drupalUrl + path) })