serverless-offline
serverless-offline copied to clipboard
Long header value causes 431 on requests
Hi, i need to send an authorization token with a length of nearly 9000 characters.
That causes the offline server to respond with 431 - Request Header Fields To Large.
Is there any possibility to make it accept such big headers? I didn't find any option for it.
that might be a node.js limitation. you could try to change the header max size for node.js: https://nodejs.org/api/cli.html#--max-http-header-sizesize
@dnalborczyk i know that, but how do i push that param into a call like "serverless offline --stage xyz" ?
there's multiple ways, this is one possibility: NODE_OPTIONS="max-http-header-size=9000" serverless offline --stage xyz
@dnalborczyk cool, that is what i was looking for. thanks.