chore: configure Traefik X-Request-Id header forwarding (refs #83)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 30s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 31s
Deploy to Staging / Verify Staging (pull_request) Successful in 2m19s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 30s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 31s
Deploy to Staging / Verify Staging (pull_request) Successful in 2m19s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
- Add X-Request-Id to access log fields for request correlation - Add request-id middleware documenting backend UUID generation - Add X-Request-Id to CORS allowed headers Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,16 @@
|
|||||||
http:
|
http:
|
||||||
middlewares:
|
middlewares:
|
||||||
|
# Request ID forwarding middleware
|
||||||
|
# Note: Traefik v3 lacks native UUID generation
|
||||||
|
# Backend generates X-Request-Id if not present in request
|
||||||
|
# This middleware ensures the header is forwarded when present
|
||||||
|
request-id:
|
||||||
|
headers:
|
||||||
|
customRequestHeaders:
|
||||||
|
X-Forwarded-Host: "{{ .Request.Host }}"
|
||||||
|
# X-Request-Id forwarded automatically via passthrough
|
||||||
|
# Backend responsibility: generate UUID if header missing
|
||||||
|
|
||||||
# Security headers middleware
|
# Security headers middleware
|
||||||
secure-headers:
|
secure-headers:
|
||||||
headers:
|
headers:
|
||||||
@@ -33,6 +44,7 @@ http:
|
|||||||
- "Content-Type"
|
- "Content-Type"
|
||||||
- "X-Requested-With"
|
- "X-Requested-With"
|
||||||
- "X-Tenant-ID"
|
- "X-Tenant-ID"
|
||||||
|
- "X-Request-Id"
|
||||||
accessControlAllowMethods:
|
accessControlAllowMethods:
|
||||||
- "GET"
|
- "GET"
|
||||||
- "POST"
|
- "POST"
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ accessLog:
|
|||||||
User-Agent: redact
|
User-Agent: redact
|
||||||
Authorization: drop
|
Authorization: drop
|
||||||
Cookie: drop
|
Cookie: drop
|
||||||
|
X-Request-Id: keep
|
||||||
|
|
||||||
# Metrics for monitoring
|
# Metrics for monitoring
|
||||||
metrics:
|
metrics:
|
||||||
|
|||||||
Reference in New Issue
Block a user