fix(next): pre-flight OPTIONS request errors from the graphql endpoint (#11103)

Fixes https://github.com/payloadcms/payload/issues/11101
This commit is contained in:
Sasha
2025-02-11 20:22:16 +02:00
committed by GitHub
parent 7a400a7a79
commit ececa65c78

View File

@@ -34,7 +34,9 @@ const handlerBuilder =
const response = await handleEndpoints({
config,
path: `${awaitedConfig.routes.api}/${awaitedParams.slug.join('/')}`,
path: awaitedParams
? `${awaitedConfig.routes.api}/${awaitedParams.slug.join('/')}`
: undefined,
request,
})