The application return 400 because it has 3 cookies, about 4k bytes each. I am trying to set the max-http-header-size property when running the application with angular cli. (ng serve)
The application works as expected when running in production.
Technologies:
angular CLI: 8.1.3
asp.net core 2.1.3
Tried running node --max-http-header-size=14000 but it does not work.
The solution would be to set the value of the max header size before calling the ng serve function: node --max-http-header-size=100000 ./node_modules/@angular/cli/bin/ng serve
If you are using ASP.NET Core, this can be added in package.json:
"scripts": {
"ng": "ng",
"start": "node --max-http-header-size=100000 ./node_modules/@angular/cli/bin/ng serve",
"build": "ng build"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With