File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -166,6 +166,11 @@ The Lambda function should return a JSON object with a `type` of
166166` body ` . Response metadata can set the HTTP status and headers; ` bodyEncoding `
167167can be set to ` base64 ` for binary response bodies.
168168
169+ For ` httpjson ` , an incoming ` X-Request-ID ` header is preserved in
170+ ` meta.headers ` ; when it is absent, no synthetic ID is generated. When an ID is
171+ present, it is used in structured logs and returned to the client in the
172+ ` X-Request-ID ` response header.
173+
169174### API Gateway v2
170175
171176For API Gateway v2 events, request headers and duplicate query parameters use
@@ -187,10 +192,9 @@ handler errors.
187192
188193For ` api_gateway_v2 ` , an incoming ` X-Request-ID ` header is preserved; when it
189194is absent, caddy-lambda generates a UUID matching the format used by AWS API
190- Gateway and places it in ` requestContext.requestId ` . For ` httpjson ` , an
191- incoming ID is preserved in ` meta.headers ` , but no synthetic ID is generated
192- when it is absent. When an ID is present, it is used in structured logs and
193- returned to the client in the ` X-Request-ID ` response header.
195+ Gateway and places it in ` requestContext.requestId ` . When an ID is present, it
196+ is used in structured logs and returned to the client in the ` X-Request-ID `
197+ response header.
194198
195199## Logging
196200
You can’t perform that action at this time.
0 commit comments