diff --git a/src/next-edge-app/index.ts b/src/next-edge-app/index.ts index 3ee4bb5..3e770d4 100644 --- a/src/next-edge-app/index.ts +++ b/src/next-edge-app/index.ts @@ -80,8 +80,14 @@ export function createApiHandler(options: CreateApiHandlerOptions) { requestHeaders.set("Ory-No-Custom-Domain-Redirect", "true") // Only effective in CI. - if (process.env.ORY_NETWORK_STAGING_RATE_LIMIT_HEADER && process.env.ORY_NETWORK_STAGING_RATE_LIMIT_KEY) { - requestHeaders.set(process.env.ORY_NETWORK_STAGING_RATE_LIMIT_HEADER, process.env.ORY_NETWORK_STAGING_RATE_LIMIT_KEY) + if ( + process.env.ORY_NETWORK_STAGING_RATE_LIMIT_HEADER && + process.env.ORY_NETWORK_STAGING_RATE_LIMIT_KEY + ) { + requestHeaders.set( + process.env.ORY_NETWORK_STAGING_RATE_LIMIT_HEADER, + process.env.ORY_NETWORK_STAGING_RATE_LIMIT_KEY, + ) } try { diff --git a/src/next-edge/index.ts b/src/next-edge/index.ts index 167aefe..c336dfa 100644 --- a/src/next-edge/index.ts +++ b/src/next-edge/index.ts @@ -116,8 +116,14 @@ export function createApiHandler(options: CreateApiHandlerOptions) { headers.set("Ory-No-Custom-Domain-Redirect", "true") // Only effective in CI. - if (process.env.ORY_NETWORK_STAGING_RATE_LIMIT_HEADER && process.env.ORY_NETWORK_STAGING_RATE_LIMIT_KEY) { - headers.set(process.env.ORY_NETWORK_STAGING_RATE_LIMIT_HEADER, process.env.ORY_NETWORK_STAGING_RATE_LIMIT_KEY) + if ( + process.env.ORY_NETWORK_STAGING_RATE_LIMIT_HEADER && + process.env.ORY_NETWORK_STAGING_RATE_LIMIT_KEY + ) { + headers.set( + process.env.ORY_NETWORK_STAGING_RATE_LIMIT_HEADER, + process.env.ORY_NETWORK_STAGING_RATE_LIMIT_KEY, + ) } const response = await fetch(url, {