From 328b4a4de9dbee3e053503e490916862059b0ef5 Mon Sep 17 00:00:00 2001 From: Tom Akehurst Date: Wed, 3 Apr 2024 09:45:56 +0100 Subject: [PATCH] Added docs for disabling HTTP/2 --- _docs/configuration.md | 14 ++++++++++++++ _docs/standalone/java-jar.md | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/_docs/configuration.md b/_docs/configuration.md index 5f12cf4c..d49400fc 100644 --- a/_docs/configuration.md +++ b/_docs/configuration.md @@ -98,6 +98,20 @@ WireMock uses the trust store for three purposes: 3. As a proxy, WireMock will trust a target server if it presents a public certificate in this trust store + +## HTTP/2 configuration + +HTTP/2 can be disabled separately for plain text (HTTP) and TLS (HTTPS): + +```java +// Disable HTTP/2 over HTTP +.http2PlainDisabled(true); + +// Disable HTTP/2 over HTTPS +.http2TlsDisabled(true); +``` + + ## Proxy settings ```java diff --git a/_docs/standalone/java-jar.md b/_docs/standalone/java-jar.md index 28dcbae0..cfb978b6 100644 --- a/_docs/standalone/java-jar.md +++ b/_docs/standalone/java-jar.md @@ -30,6 +30,10 @@ The following can optionally be specified on the command line: `--disable-http`: Disable the HTTP listener, option available only if HTTPS is enabled. +`--disable-http2-plain`: Disable HTTP/2 over plain text (HTTP). + +`--disable-http2-tls`: Disable HTTP/2 over TLS (HTTPS). + `--https-port`: If specified, enables HTTPS on the supplied port. Note: When you specify this parameter, WireMock will still, additionally, bind to an HTTP port (8080 by default). So when running multiple WireMock servers you will also need to specify the `--port` parameter in order to avoid conflicts.