Skip to content

fix: write X-Request-Id to responses and validate PORT/MAX_ATTACHMENT_BYTES#24

Merged
cuibonobo merged 2 commits into
mainfrom
claude/issue-17-request-id-validation
Jun 21, 2026
Merged

fix: write X-Request-Id to responses and validate PORT/MAX_ATTACHMENT_BYTES#24
cuibonobo merged 2 commits into
mainfrom
claude/issue-17-request-id-validation

Conversation

@cuibonobo

Copy link
Copy Markdown
Member

Summary

  • src/app.ts: Set X-Request-Id on every response so clients and log aggregators can correlate requests using the same ID that appears in server logs (it was generated and stored but never written to the response)
  • src/config.ts: Add range validation for PORT (1–65535) and MAX_ATTACHMENT_BYTES (≥ 1) so invalid values produce a clear startup error instead of a silent bind failure or broken upload limit

Closes #17

🤖 Generated with Claude Code

https://claude.ai/code/session_01E2tdGyLhqTN2baMpaWDet3


Generated by Claude Code

claude added 2 commits June 21, 2026 02:30
…_BYTES

Set X-Request-Id on every response so clients and log aggregators can
correlate requests using the same ID that appears in server logs.

Add range checks for PORT (1-65535) and MAX_ATTACHMENT_BYTES (>= 1) in
loadConfig() so invalid values produce a clear startup error rather than
a silent bind failure or a broken upload limit.

Closes #17

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2tdGyLhqTN2baMpaWDet3
@cuibonobo cuibonobo merged commit 606028c into main Jun 21, 2026
@cuibonobo cuibonobo deleted the claude/issue-17-request-id-validation branch June 21, 2026 02:33
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.

Bug: X-Request-Id never written to responses; PORT and MAX_ATTACHMENT_BYTES not range-validated

2 participants