feat(backend): add getTracker method for IP extraction (#3535)
Co-authored-by: Raphael Hehl <Raphael.Hehl@deutschebahn.com>
This commit is contained in:
parent
12f35d880d
commit
cb52a582ac
1 changed files with 3 additions and 0 deletions
|
|
@ -9,4 +9,7 @@ export class GqlThrottlerGuard extends ThrottlerGuard {
|
|||
const ctx = gqlCtx.getContext();
|
||||
return { req: ctx.req, res: ctx.res };
|
||||
}
|
||||
protected async getTracker(req: Record<string, any>): Promise<string> {
|
||||
return req.ips.length ? req.ips[0] : req.ip; // individualize IP extraction to meet your own needs
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue