caddy-teapot-module

✨ A Caddy (v2) module which responds with "418 I'm a teapot" to all requests.

MIT License

Stars
29

Teapot module for Caddy v2

Package teapot implements a sample Caddy v2 module. Its only purpose is to respond with 418 I'm a teapot to every request.

The simplest use could be in a Caddyfile like:

localhost

route {
    teapot
}

Then, when using a Caddy server with this module enabled:

$ curl -I --http1.1 localhost/any/path
HTTP/1.1 418 I'm a teapot
Server: Caddy
Date: Sun, 01 Mar 2020 15:48:23 GMT

(you could, of course use curl --http2, but the reason-phrase I'm a teapot won't display, and that's no fun!)

See also the example/ folder for an example of usage.