diff options
| author | Xe Iaso <me@xeiaso.net> | 2025-01-17 13:22:02 -0500 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2025-01-17 13:22:02 -0500 |
| commit | 58461fb9a948abf87ee7b722a407f38fcf6f5c46 (patch) | |
| tree | 38856311a6ab6f0dd5678483e80f6ed7a6c5c9ac | |
| parent | 6f568d9c8e84b5f6d981215c1bc424bf90cbb217 (diff) | |
| download | x-58461fb9a948abf87ee7b722a407f38fcf6f5c46.tar.xz x-58461fb9a948abf87ee7b722a407f38fcf6f5c46.zip | |
cmd/uncle-ted: gzip the bee movie script
Signed-off-by: Xe Iaso <me@xeiaso.net>
| -rw-r--r-- | cmd/uncle-ted/main.go | 3 | ||||
| -rw-r--r-- | go.mod | 1 | ||||
| -rw-r--r-- | go.sum | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/cmd/uncle-ted/main.go b/cmd/uncle-ted/main.go index 7998a40..d0c6d60 100644 --- a/cmd/uncle-ted/main.go +++ b/cmd/uncle-ted/main.go @@ -7,6 +7,7 @@ import ( "log/slog" "net/http" + "github.com/NYTimes/gziphandler" "within.website/x/internal" ) @@ -23,7 +24,7 @@ var ( func main() { internal.HandleStartup() - http.HandleFunc("/bee-movie", beeMovie) + http.Handle("/bee-movie", gziphandler.GzipHandler(http.HandlerFunc(beeMovie))) http.HandleFunc("/gzip-bomb", gzipBomb) slog.Info("started up", "url", "http://localhost"+*bind) @@ -89,6 +89,7 @@ require ( github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Masterminds/sprig/v3 v3.2.3 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/ProtonMail/go-crypto v1.1.3 // indirect github.com/andybalholm/brotli v1.1.1 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect @@ -86,6 +86,8 @@ github.com/McKael/madon/v2 v2.4.0/go.mod h1:fSjqeQzvbKPjWQOv0VV3SPKvPCmj6Y+meOqk github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk= github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= |
