diff options
| author | Xe Iaso <me@xeiaso.net> | 2025-01-24 15:34:10 -0500 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2025-01-24 15:34:15 -0500 |
| commit | 2eae2a4cf5ed2507f6525e2f3c2e055935eeda0e (patch) | |
| tree | 90a387184d942333468f4e48c25786ef085d04a8 /cmd/httpdebug/main.go | |
| parent | 1cab72372520f232a64a37aaebbc42068af6151e (diff) | |
| download | x-2eae2a4cf5ed2507f6525e2f3c2e055935eeda0e.tar.xz x-2eae2a4cf5ed2507f6525e2f3c2e055935eeda0e.zip | |
cmd/anubis: don't include Accept-Encoding in challenge
Browsers are known to change the Accept-Encoding header based on
what media type is being accepted. I kinda hate this too, but such
is life.
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd/httpdebug/main.go')
| -rw-r--r-- | cmd/httpdebug/main.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/httpdebug/main.go b/cmd/httpdebug/main.go index 8d61c03..1f7a042 100644 --- a/cmd/httpdebug/main.go +++ b/cmd/httpdebug/main.go @@ -2,9 +2,12 @@ package main import ( "flag" + "fmt" + "io" "log" "log/slog" "net/http" + "os" "within.website/x/internal" ) @@ -19,7 +22,9 @@ func main() { slog.Info("listening", "url", "http://localhost"+*bind) log.Fatal(http.ListenAndServe(*bind, http.HandlerFunc( func(w http.ResponseWriter, r *http.Request) { - r.Write(w) + fmt.Println("---") + r.Write(io.MultiWriter(w, os.Stdout)) + fmt.Println("---") }, ))) } |
