feat(security): add Redis-backed app-layer anti-DDoS rate limiting to proxy
Gitea Actions Runner Test / test-job (push) Successful in 1s
CI / check (push) Successful in 31s
CI / tests-integration (push) Successful in 1m42s
CI / tests-unit (push) Successful in 1m47s
CI / tests-ui (push) Successful in 2m40s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 2m3s

This commit is contained in:
openhands committed 2026-09-22 21:48:40 +02:00
1 parent d8f2a21011
commit 98a184953a
5 files changed
+184 -8

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import { describe, expect, it } from "vitest";
import { classifyDdos } from "@/lib/ddos";
describe("classifyDdos", () => {
it.each([
["/", "pages"],
["/community", "pages"],
["/login", "auth"],
["/login/", "auth"],
["/register", "auth"],
["/admin", "auth"],
["/admin/home", "auth"],
["/api/auth/callback/credentials", "auth"],
["/api/articles/hello", "api"],
["/api/radio/stream", "api"],
])(`classifies %s as %s`, (pathname, expected) => {
expect(classifyDdos(pathname)).toBe(expected);
});
});