mirror of
https://github.com/apotdevin/thunderhub.git
synced 2025-02-21 22:11:37 +01:00
chore: prettier
This commit is contained in:
parent
af2ef16c10
commit
81da8f2950
1 changed files with 3 additions and 1 deletions
|
@ -6,7 +6,9 @@ export const getIp = (req: any) => {
|
|||
return '';
|
||||
}
|
||||
const forwarded = req.headers['x-forwarded-for'];
|
||||
const before = forwarded ? forwarded.split(/, /)[0] : req.connection.remoteAddress;
|
||||
const before = forwarded
|
||||
? forwarded.split(/, /)[0]
|
||||
: req.connection.remoteAddress;
|
||||
const ip = process.env.NODE_ENV === 'development' ? '1.2.3.4' : before;
|
||||
return ip;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue