Home > Net >  How to change max http header size in react
How to change max http header size in react

Time:05-21

I'm new to react and trying to send a fetch or ajax request to a PHP script, initially I was receiving a 404 response but I read I had to place this:

header('Access-Control-Allow-Origin: http://localhost:3000');

at the top of the php script but after that the responses changed to:

431: (Request Header Fields Too Large).

I read the problem is from the max http header size being small so I want to know if it is possible to increase the it and if yes how do I do that.

CodePudding user response:

I know it is not your answer but You can use axios better than using fetch and much easier

CodePudding user response:

clear you your cookies in browser & try again. If it's not working, add "proxy" : "http://localhost:3000" in your package.json

Thanks

  • Related