Skip to content

Commit

Permalink
Log gateway requests
Browse files Browse the repository at this point in the history
  • Loading branch information
makew0rld committed May 9, 2022
1 parent b304b1a commit d89cf68
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions go-ipfs/core/corehttp/gateway_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ func (i *gatewayHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
}()

if len(r.URL.RawQuery) > 0 {
golog.Printf("Gateway: %s %s", r.Method, r.URL.Path+"?"+r.URL.RawQuery)
} else {
golog.Printf("Gateway: %s %s", r.Method, r.URL.Path)
}

if strings.HasPrefix(r.URL.Path, "/pubsub/") {
switch r.Method {
case http.MethodGet:
Expand Down

0 comments on commit d89cf68

Please sign in to comment.