Skip to content

Commit 09f0023

Browse files
authored
Log the Origin header for HTTP requests (#65)
1 parent ac34ae9 commit 09f0023

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (h *Handler) healthcheck(w http.ResponseWriter, r *http.Request) {
9090
}
9191

9292
func (h *Handler) handle(w http.ResponseWriter, r *http.Request) {
93-
log.Printf("Request from %s", r.RemoteAddr)
93+
log.Printf("Request from %s at \"%s\"", r.RemoteAddr, r.Header.Get("Origin"))
9494

9595
// Set the CORS headers
9696
w.Header().Set("Access-Control-Allow-Origin", "*")

0 commit comments

Comments
 (0)