RequestLambdaEdgeAdapterOptions
@h4ad/serverless-adapter > RequestLambdaEdgeAdapterOptions
(interface) RequestLambdaEdgeAdapterOptions
The options to customize the RequestLambdaEdgeAdapter .
Signature:
export interface RequestLambdaEdgeAdapterOptions
(property) disallowedHeaders
The headers that will be stripped from the headers object because Lambda @ edge will fail if these headers are passed in the response.
Signature:
disallowedHeaders?: (string | RegExp)[];
Remarks
All headers will be compared with other headers using toLowerCase, but for the RegExp, if you modify this list, you must put the flag /gmi
at the end of the RegExp (ex: /(X-Amz-Cf-)(.*)/gim
)
(property) onResponseSizeExceedLimit
The function called when the response size exceed the max limits of the Lambda @ edge
Signature:
onResponseSizeExceedLimit?: (response: CloudFrontRequestResult) => CloudFrontRequestResult;
(property) originMaxResponseSizeInBytes
The max response size in bytes of origin request and origin response.
Signature:
originMaxResponseSizeInBytes?: number;
(property) shouldStripHeader
If you want to change how we check against the header if it should be stripped, you can pass a function to this property.
Signature:
shouldStripHeader?: (header: string) => boolean;
(property) stripBasePath
Strip base path for custom paths, like /api
.
Signature:
stripBasePath?: string;
(property) viewerMaxResponseSizeInBytes
The max response size in bytes of viewer request and viewer response.
Signature:
viewerMaxResponseSizeInBytes?: number;