Merge branch 'feature/api-03-zentrales-rate-limiting-api-gateway-schicht' into feature/qa-04-sicherheits-penetrationspruefung-core
# Conflicts: # scripts/reset-test-env.sh # scripts/run-checks.sh
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
DROP TABLE rate_limit_counters;
|
||||
DROP TABLE rate_limit_configs;
|
||||
@@ -0,0 +1,15 @@
|
||||
-- Rate-Limiting mit geteiltem, externem Zustand (API-03, siehe
|
||||
-- core-kanban/tickets/API-03.md) — bewusst NICHT In-Process, damit mehrere
|
||||
-- Dienstinstanzen dasselbe Limit korrekt durchsetzen.
|
||||
CREATE TABLE rate_limit_configs (
|
||||
key TEXT PRIMARY KEY,
|
||||
limit_value INT NOT NULL,
|
||||
window_seconds INT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE rate_limit_counters (
|
||||
key TEXT NOT NULL,
|
||||
window_start TIMESTAMPTZ NOT NULL,
|
||||
count INT NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (key, window_start)
|
||||
);
|
||||
Reference in New Issue
Block a user