Go Kratos2.0 Http请求如何获取IP地址(Filter,Middleware)
Kratos2.0 支持Http请求模式,但对于Http请求的常见使用场景支撑的并不多,很多时候需要编程人员通过Filter和Middleware实现,以下是一种获取http请求来源IP的方式;1.server/http.go NewHTTPServer 方法中添加Filter和Middleware// NewHTTPServer new a HTTP server.func NewHTTPServer(c *conf.Server, a *conf.Auth, user *service.Us







