summary refs log tree commit diff
path: root/src/middlewares/GlobalRateLimit.ts
diff options
context:
space:
mode:
authorDiego Magdaleno <diegomagdaleno@protonmail.com>2021-05-22 18:51:46 -0500
committerDiego Magdaleno <diegomagdaleno@protonmail.com>2021-05-22 18:51:46 -0500
commitff7985ad7d214cd2c7b5c2341aaa878edc826d20 (patch)
tree6dde0f5357c25ea5c4f279f81b903d3b2386f6c3 /src/middlewares/GlobalRateLimit.ts
parentFix merge issues, update to reflect config changes and package.json (diff)
downloadserver-ff7985ad7d214cd2c7b5c2341aaa878edc826d20.tar.xz
Config: Final config additons, now everything should work as desired
Diffstat (limited to 'src/middlewares/GlobalRateLimit.ts')
-rw-r--r--src/middlewares/GlobalRateLimit.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/middlewares/GlobalRateLimit.ts b/src/middlewares/GlobalRateLimit.ts

index 38098981..ce2bfa52 100644 --- a/src/middlewares/GlobalRateLimit.ts +++ b/src/middlewares/GlobalRateLimit.ts
@@ -44,7 +44,7 @@ export async function GlobalRateLimit(req: Request, res: Response, next: NextFun } export function getIpAdress(req: Request): string { - const { forwadedFor } = Config.apiConfig.getAll().security; + const { forwadedFor } = (Config.apiConfig.getAll() as Config.DefaultOptions).security; const ip = forwadedFor ? <string>req.headers[forwadedFor] : req.ip; return ip.replaceAll(".", "_").replaceAll(":", "_"); }