Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nextjs problem without forwarding headers #65

Open
elbotho opened this issue Apr 24, 2024 · 0 comments
Open

nextjs problem without forwarding headers #65

elbotho opened this issue Apr 24, 2024 · 0 comments

Comments

@elbotho
Copy link

elbotho commented Apr 24, 2024

Since yesterday we had a problem with the calls to our kratos api route api/ory/[...paths].ts always returning 500.
It did not depend on any changes / updates on our side and my best guess is that vervel changed something on their end.

Afer a lot of debugging I got it to work again with the following options:

export default createApiHandler({
  …
  forwardAdditionalHeaders: [
    'x-vercel-internal-timing',
    'x-vercel-cache',
    'x-vercel-id',
  ],
})

Maybe this helps someone else out.
You probably don't need all the headers, but only x-vercel-internal-timing did not work.

Full error message Uncaught Exception: TypeError [ERR_HTTP_INVALID_HEADER_VALUE]: Invalid value "undefined" for header "x-vercel-internal-timing" at ServerResponse.setHeader (node:_http_outgoing:662:3) at h.setHeader (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:20:5747) at n.writeHead (/opt/rust/nodejs.js:7:2551) at ServerResponse._implicitHeader (node:_http_server:338:8) at write_ (node:_http_outgoing:945:9) at ServerResponse.end (node:_http_outgoing:1056:5) at K.r.end (/var/task/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:13330) at /var/task/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:14144 at K.r.send (/var/task/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:14153) at Request. (/var/task/node_modules/@ory/integrations/next-edge/index.js:116:17) { code: 'ERR_HTTP_INVALID_HEADER_VALUE' } Node.js process exited with exit status: 129. The logs above can help with debugging the issue. Unknown application error occurred
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant