HTTP/1.0 400 Bad request Cache-Control: no-cache Connection: close Content-Type: text/html
In a Spring Boot app, the max HTTP header size is configured using:
server.max-http-header-size
It is an INT value in ServerProperties with a default value of 0. The actual default value for Tomcat and Jetty is 8 kB and the default value for Undertow is 1 MB.
When deploying your Spring Boot app, an embedded tomcat is being used as the application server. If a request is sent where the total HTTP header size is larger than 8 kB bytes, Tomcat rejects the request with a "400 Bad request" error.
To modify the max HTTP header size in your app configuration file:
server.max-http-header-size=20000
server: max-http-header-size: 20000
cf set-env <APP_NAME> SERVER_MAXHTTPHEADERSIZE 20000
cf restage <APP_NAME>