Phisherman enforces a per-IP rate limit on all requests using a Redis-backed counter. The limit is applied by theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/joey727/Phisherman/llms.txt
Use this file to discover all available pages before exploring further.
apiLimiter middleware registered in src/index.ts before any route handler runs.
Limit parameters
| Parameter | Value |
|---|---|
| Requests per window | 100 |
| Window duration | 15 minutes (900 seconds) |
| Scope | Per client IP address |
| Storage | Redis String (ratelimit:<ip>) |
How it works
On every incoming request, the middleware:- Resolves the client IP from
req.ip, then falls back to thex-forwarded-forheader, thenreq.socket.remoteAddress. - Increments the Redis key
ratelimit:<ip>usingINCR. - If this is the first request (counter equals
1), sets a 900-second expiry on the key so the window resets automatically. - If the counter exceeds
100, returns a429response immediately without calling the next middleware. - Otherwise, calls
next()to proceed with the request.
Middleware source
429 response format
When the limit is exceeded, the server responds with HTTP429 and the following JSON body:
current reflects the actual request count at the time of rejection, which may be higher than limit + 1 if requests arrive concurrently.
Reverse proxy support
Phisherman callsapp.set("trust proxy", 1) in src/index.ts, which instructs Express to trust the first value in the X-Forwarded-For header as the real client IP. This means rate limiting correctly identifies the originating client when Phisherman is deployed behind a single reverse proxy (nginx, Caddy, a load balancer, etc.).
If you run Phisherman behind more than one proxy hop, adjust the trust proxy setting accordingly. See the Express behind proxies documentation for details.
app.set("trust proxy", 1) is set in src/index.ts:12. Without this setting, req.ip would always be the proxy’s IP address, and all traffic would share a single rate limit bucket.