My api is protected via jwt, is it possible to specify a jwt token when fetch profile via go tool pprof
?
Currently, I have to config jwt middleware to bypass the /debug/pprof
routes.
I couldn't find a way to pass a token via go tool pprof
directly, but due to the fact that you can use curl
to fetch the profile, there is a simple workaround:
$ curl -o profile.out https://host/debug/pprof -X 'X-Authorization: $TOKEN'
$ go tool pprof profile.out
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.