]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
HTTP3.md: update Caddy example
authorMatt Holt <mholt@users.noreply.github.com>
Thu, 29 Sep 2022 18:42:00 +0000 (12:42 -0600)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 30 Sep 2022 06:21:15 +0000 (08:21 +0200)
Closes #9623

docs/HTTP3.md

index 16202b78c8e6e9d0f92f82a328e810ed02e30f9b..26141bb75f172eb775b5872f28f00c5045df88da 100644 (file)
@@ -291,26 +291,21 @@ that exists in curl's test dir.
 
 ### Caddy
 
-[Install Caddy](https://caddyserver.com/docs/install), you can even put the
-single binary in a separate directory if you prefer.
+[Install Caddy](https://caddyserver.com/docs/install). For easiest use, the binary
+should be either in your PATH or your current directory.
 
-In the same directory you put Caddy, create a `Caddyfile` with the following
-content to run an HTTP/3 reverse-proxy on port 7443:
+Create a `Caddyfile` with the following content:
 ~~~
-{
-    auto_https disable_redirects
-       servers :7443 {
-               protocol {
-                       experimental_http3
-               }
-       }
-}
-
 localhost:7443 {
-       reverse_proxy localhost:80
+       respond "Hello, world! You're using {http.request.proto}"
 }
 ~~~
 
 Then run Caddy:
 
     ./caddy start
+
+Making requests to `https://localhost:7443` should tell you which protocol is being used.
+
+You can change the hard-coded response to something more useful by replacing `respond`
+with `reverse_proxy` or `file_server`, for example: `reverse_proxy localhost:80`