There is a server.max-http-header-size property to change the max header size limit, however, for tomcat Http2Protocol, that property doesn't take effect, it still uses the default 8kb limit.

https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java#L339 I think this needs to be updated to configure the Http2Protocol with setMaxHeaderSize

We can work around the issue with TomcatConnectorCustomizer, but ideally that single property can affect http2 as well to be consistent