Skip to content

Commit

Permalink
fix: query command doesn't show the client IP (#861) (#914)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xERR0R committed Mar 7, 2023
1 parent 120e32c commit bcea1a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/server_endpoints.go
Expand Up @@ -201,7 +201,8 @@ func (s *Server) apiQuery(rw http.ResponseWriter, req *http.Request) {
}

dnsRequest := util.NewMsgWithQuestion(query, qType)
r := createResolverRequest(nil, dnsRequest)

r := newRequest(net.ParseIP(extractIP(req)), model.RequestProtocolTCP, "", dnsRequest)

response, err := s.queryResolver.Resolve(r)
if err != nil {
Expand Down

0 comments on commit bcea1a9

Please sign in to comment.