fix: write X-Request-Id to responses and validate PORT/MAX_ATTACHMENT_BYTES#24
Merged
Merged
Conversation
…_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
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E2tdGyLhqTN2baMpaWDet3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/app.ts: SetX-Request-Idon 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 forPORT(1–65535) andMAX_ATTACHMENT_BYTES(≥ 1) so invalid values produce a clear startup error instead of a silent bind failure or broken upload limitCloses #17
🤖 Generated with Claude Code
https://claude.ai/code/session_01E2tdGyLhqTN2baMpaWDet3
Generated by Claude Code