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