mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
AWS SDKs rigorously depend on standard HTTP identification headers (like `x-amz-request-id` and `x-amzn-RequestId`) to completely and accurately construct the `ResponseMetadata` payload in their clients. Because Floci lacked these headers on generic API responses, the SDK failed to parse identifiers (resulting in `$metadata.requestId` resolving to `undefined`). This commit introduces a JAX-RS `AwsRequestIdFilter` to automatically and globally append these necessary structural headers to every HTTP response, mapped via a single uniformly-generated UUID. Preexisting explicitly set controllers (such as Lambda's Invoke) are bypassed to preserve context. Added `AwsRequestIdFilterIntegrationTest` verifying end-to-end protocol formats. Fixes #145