mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-14 19:22:50 +00:00
优化判断
This commit is contained in:
parent
cbe2c16c32
commit
ab9c81d393
@ -18,7 +18,8 @@ export class Utils {
|
|||||||
const req = ctx.req;
|
const req = ctx.req;
|
||||||
return (
|
return (
|
||||||
req.headers['x-forwarded-for'] ||
|
req.headers['x-forwarded-for'] ||
|
||||||
req.socket.remoteAddress.replace('::ffff:', '')
|
req.socket.remoteAddress?.replace('::ffff:', '') ||
|
||||||
|
''
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user