vweb: make ip() to return peer_ip work (#6399)

pull/6402/head
Seven Du 2020-09-17 15:38:39 +08:00 committed by GitHub
parent 11f10fdce2
commit 98e6d25b42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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) {