mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix(docker): resolve 4 release-blocking issues from validation
- fix(rate-limit): treat RATE_LIMIT_PER_MIN=0 as unlimited (50k/min) instead of blocking all requests. @fastify/rate-limit interprets max:0 as "allow zero requests," breaking fresh container startups. - fix(docker): add libgles2 for MediaPipe face detection tools. blur-faces, red-eye-removal, enhance-faces, and passport-photo failed with "libGLESv2.so.2 not found" on all headless containers. - fix(docker/arm64): remove conflicting system libheif1 to avoid ABI symbol mismatch with our custom libheif 1.21.2 build. heif-convert failed with "undefined symbol: heif_get_plugin_directories." - fix(docker/arm64): pre-install wheel+setuptools in base Python venv so basicsr can build from source on arm64 (no pre-built wheel). This unblocks upscale-enhance and photo-restoration bundles.
This commit is contained in:
@@ -184,8 +184,9 @@ app.addHook("onSend", async (_request, reply) => {
|
||||
});
|
||||
|
||||
// Always register rate-limit plugin so per-route limits (login brute-force protection) work.
|
||||
// max=0 means "unlimited" (50k/min) -- @fastify/rate-limit treats literal 0 as "block all".
|
||||
await app.register(rateLimit, {
|
||||
max: env.RATE_LIMIT_PER_MIN,
|
||||
max: env.RATE_LIMIT_PER_MIN > 0 ? env.RATE_LIMIT_PER_MIN : 50_000,
|
||||
timeWindow: "1 minute",
|
||||
allowList: (request) => !request.url.startsWith("/api/"),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user