我的api是通过jwt保护的,是否可以在通过go tool pprof获取概要文件时指定jwt令牌?
目前,我必须配置jwt中间件以绕过/debug/pprof路由。
发布于 2022-09-12 11:10:38
我无法找到直接通过go tool pprof传递令牌的方法,但由于可以使用curl获取配置文件,有一个简单的解决方法:
$ curl -o profile.out https://host/debug/pprof -X 'X-Authorization: $TOKEN'
$ go tool pprof profile.outhttps://stackoverflow.com/questions/73277356
复制相似问题