mirror of
https://github.com/svemagie/indiekit-endpoint-activitypub.git
synced 2026-04-02 15:44:58 +02:00
fix(rate-limit): suppress ERR_ERL_PERMISSIVE_TRUST_PROXY behind nginx reverse proxy
This commit is contained in:
@@ -28,6 +28,7 @@ const apiLimiter = rateLimit({
|
||||
max: 300,
|
||||
standardHeaders: true,
|
||||
legacyHeaders: false,
|
||||
validate: { trustProxy: false }, // behind nginx reverse proxy; trust proxy is intentional
|
||||
message: { error: "Too many requests, please try again later" },
|
||||
});
|
||||
|
||||
@@ -36,6 +37,7 @@ const authLimiter = rateLimit({
|
||||
max: 30,
|
||||
standardHeaders: true,
|
||||
legacyHeaders: false,
|
||||
validate: { trustProxy: false },
|
||||
message: { error: "Too many authentication attempts" },
|
||||
});
|
||||
|
||||
@@ -44,6 +46,7 @@ const appRegistrationLimiter = rateLimit({
|
||||
max: 25,
|
||||
standardHeaders: true,
|
||||
legacyHeaders: false,
|
||||
validate: { trustProxy: false },
|
||||
message: { error: "Too many app registrations" },
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user