Skip to content

fix: add per-request timeout layer to prevent slow-loris style connec… - #183

Merged
Manuel1234477 merged 2 commits into
StellarGateLabs:mainfrom
Markodiba6399:fix/api-request-timeout
Jul 21, 2026
Merged

fix: add per-request timeout layer to prevent slow-loris style connec…#183
Manuel1234477 merged 2 commits into
StellarGateLabs:mainfrom
Markodiba6399:fix/api-request-timeout

Conversation

@Markodiba6399

Copy link
Copy Markdown

…tions

No request-level timeout existed, so a slow client could hold a connection or handler open indefinitely. Adds tower_http's TimeoutLayer (configurable via REQUEST_TIMEOUT_SECS, default 30s) as the outermost router layer, returning 408 for requests that exceed it.

Also fixes webhook_timeout_secs, which was declared on Config but never actually read from the environment in from_env() (a gap left by #162), so the crate failed to compile.

closes #131

Markodiba and others added 2 commits July 21, 2026 17:04
…tions

No request-level timeout existed, so a slow client could hold a connection
or handler open indefinitely. Adds tower_http's TimeoutLayer (configurable
via REQUEST_TIMEOUT_SECS, default 30s) as the outermost router layer,
returning 408 for requests that exceed it.

Also fixes webhook_timeout_secs, which was declared on Config but never
actually read from the environment in from_env() (a gap left by StellarGateLabs#162),
so the crate failed to compile.
@Manuel1234477
Manuel1234477 merged commit 07d7dda into StellarGateLabs:main Jul 21, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No server-level request timeout / slow-loris protection

3 participants