mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vweb: make ip() to return peer_ip work (#6399)
This commit is contained in:
parent
11f10fdce2
commit
98e6d25b42
@ -567,10 +567,10 @@ pub fn (ctx &Context) ip() string {
|
||||
if ip.contains(',') {
|
||||
ip = ip.all_before(',')
|
||||
}
|
||||
if ip == '' {
|
||||
ip = ctx.conn.peer_ip() or { '' }
|
||||
}
|
||||
return ip
|
||||
// TODO make return ctx.conn.peer_ip() or { '' } work
|
||||
//res := ctx.conn.peer_ip() or { '' }
|
||||
//return res
|
||||
}
|
||||
|
||||
pub fn (mut ctx Context) error(s string) {
|
||||
|
Loading…
Reference in New Issue
Block a user