Anthony
Anthony

Reputation: 686

Can you disable HTTP/1.1 in Spring Boot?

Is that possible? If clients are also configured to use HTTP/2 it'd be also good get rid of the upgrade step from 1.1 to 2.

Upvotes: 3

Views: 3388

Answers (1)

cassiomolin
cassiomolin

Reputation: 130857

As of Spring Boot 2.1.0, there's no configuration to disable HTTP/1.1 (and it's probably a bit too early to consider it though).


The documetation, however, states that you can enable HTTP/2 support (as opposite of disabling support for older versions):

You can enable HTTP/2 support in your Spring Boot application with the server.http2.enabled configuration property. This support depends on the chosen web server and the application environment.

As follows:

# Whether to enable HTTP/2 support, if the current environment supports it
server.http2.enabled=true

A list of common application properties is available here.

Upvotes: 2

Related Questions