machinebox / graphql

Simple low-level GraphQL HTTP client for Go
https://blog.machinebox.io/a-graphql-client-library-for-go-5bffd0455878
Apache License 2.0
933 stars 218 forks source link

The headers are always being logged #22

Closed manute closed 5 years ago

manute commented 5 years ago

Hi , This lib is superb and we are using in prod so many thanks for creating it.

But there's a problem with the headers that are being always logged here https://github.com/machinebox/graphql/blob/master/graphql.go#L124, This could expose sensitive information, mostly auth headers.

Can we avoid logging those headers? (I can create the PR but I just wanted to ask first :) )

Thanks in advance

manute commented 5 years ago

Sorry for the noise, we were using the client with

c.Graph.Log = func(s string) { log.Println(s) }