diff options
| -rw-r--r-- | cmd/anubis/main.go | 3 | ||||
| -rw-r--r-- | cmd/httpdebug/main.go | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/cmd/anubis/main.go b/cmd/anubis/main.go index bda4892..4de13ed 100644 --- a/cmd/anubis/main.go +++ b/cmd/anubis/main.go @@ -131,8 +131,7 @@ func (s *Server) challengeFor(r *http.Request) string { fp := sha256.Sum256(s.priv.Seed()) data := fmt.Sprintf( - "Accept-Encoding=%s,Accept-Language=%s,X-Real-IP=%s,User-Agent=%s,WeekTime=%s,Fingerprint=%x", - r.Header.Get("Accept-Encoding"), + "Accept-Language=%s,X-Real-IP=%s,User-Agent=%s,WeekTime=%s,Fingerprint=%x", r.Header.Get("Accept-Language"), r.Header.Get("X-Real-Ip"), r.UserAgent(), 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("---") }, ))) } |
