mirror of
https://github.com/infinite-iroha/touka.git
synced 2026-02-03 00:41:10 +08:00
fix reqip val
This commit is contained in:
parent
74f5770b42
commit
3590a77f90
1 changed files with 1 additions and 1 deletions
|
|
@ -564,7 +564,7 @@ func (c *Context) RequestIP() string {
|
|||
addrp, err := netip.ParseAddrPort(c.Request.RemoteAddr)
|
||||
if err == nil {
|
||||
// 成功从 "ip:port" 格式中解析出 IP
|
||||
return addrp.String()
|
||||
return addrp.Addr().String()
|
||||
}
|
||||
|
||||
// 如果上面的解析失败 (例如 RemoteAddr 只有 IP, 没有端口),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue