Missing headers in request
Unanswered
Largehead hairtail posted this in #help-forum
Largehead hairtailOP
When making a POST request using Route handlers (App router- /app/api/webhook/route.ts) the request has some headers missing but when doing it with API routes (/pages/api/file.ts)all the headers are there. Here's an example, left panel is the API routes and right panels is Route handler both request are from the same source but for some reason the 'twitch-eventsub-message-timestamp' header is missing in the Route handler is there a reason for this or am i doing something wrong?
2 Replies
I think it’s likely a problem with your client though, Next.js won’t remove headers from requests, do you sure the request has all headers present? Or you have missed these when calling the API?
@fuma I think it’s likely a problem with your client though, Next.js won’t remove headers from requests, do you sure the request has all headers present? Or you have missed these when calling the API?
Largehead hairtailOP
both results are from the same source (twitch eventsub api) same event too, I don't have control over the headers but i do know that in this case the header 'twitch-eventsub-message-timestamp' which is the one missing is always there for validation purposes (not a protected header), for more context the route is receving data from a webhook coming from twitch api eventsub.