Next.js Discord

Discord Forum

headers['x-..] in app routes does return undefined, headers.get('x-..) works

Unanswered
Lionhead posted this in #help-forum
Open in Discord
LionheadOP
Is this a know issue / intentional? Took me an hour to figure this out today. I am on 13.4.20-canary.11 (can't use latest canary due to a reported regression)
  console.log(request.headers['x-api-key']); // -> undefined 
  console.log(request.headers.get('x-api-key'));  --> works

1 Reply