From 2eae2a4cf5ed2507f6525e2f3c2e055935eeda0e Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Fri, 24 Jan 2025 15:34:10 -0500 Subject: 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 --- cmd/httpdebug/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cmd/httpdebug') 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("---") }, ))) } -- cgit v1.2.3