In my program, one of the requests I send throws a Header Overflow error upon receiving response. I am currently able to run my program in the command line using node --max-http-header-size=15000 app.js, but now I would like to compile the program as an executable using npm packages like pkg and nexe. I have tried too use both, and have found no ways of incorporating --max-http-header-size=15000 in pkg. With nexe, I was able to create a compiler with the following code:

const { compile } = require('nexe')

compile({
  input: './app.js',
  flags: ['--max-http-header-size 20000'],
  targets: 'windows-x64-12.16.3'
}).then(() => {
  console.log('success')
})

However, this has not worked effectively in avoiding the Header Overflow error I get if I were to run node app.js in the command line without adjusting the max header size. I have also ran nexe app.js -f --max-http-header-size=15000 -t windows-x64-12.16.3 in the terminal and had no success avoiding the overflow error. If it helps, I am using Axios as my request library. Any help is appreciated, thank you!

0

There are 0 best solutions below