Skip to content

Commit

Permalink
Revert "Change RemoteAddr to Host"
Browse files Browse the repository at this point in the history
This reverts commit 4977451.
  • Loading branch information
Shresht7 committed Nov 30, 2023
1 parent 5f56c30 commit a7bb180
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ func SelfServe(dir, host string, port int) error {

// HTTP Handler Function
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
log.Printf("\u001b[90m-- %s \u001b[92m%s\u001b[0m %s\n", r.Host, r.Method, r.URL) // Log the request
fileServer.ServeHTTP(w, r) // Serve the files
log.Printf("\u001b[90m-- %s \u001b[92m%s\u001b[0m %s\n", r.RemoteAddr, r.Method, r.URL) // Log the request
fileServer.ServeHTTP(w, r) // Serve the files
})

return http.ListenAndServe(addr, handler)
Expand Down

0 comments on commit a7bb180

Please sign in to comment.