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:
@@ -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,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user