Error 431 Request Header Fields Too Large

System Information
  • Strapi Version: 3.6.2
  • Operating System: Redhat
  • Database: Mongo
  • Node Version: Node14 / Node12
  • NPM Version:
  • Yarn Version:

We got error “431 Request Header Fields Too Large” when we sent request with header size bigger than 8192 bytes. And we found in one article which mentioned that from node 10.14, it has set the max header size as 8192 bytes. If we need header bigger than this, we need to use flag --max-http-header-size when start node. In our project, we use CMD “strapi start” to start Strapi. So how could I get this flag involved when start Strapi to ensure it could accept bigger http request header?