UNPKG

serverless-offline-edge-lambda

Version:

A plugin for the Serverless Framework that simulates the behavior of AWS CloudFront Edge Lambdas while developing offline.

10 lines (9 loc) 462 B
/// <reference types="node" /> import { CloudFrontRequestEvent } from 'aws-lambda'; import { IncomingMessage } from 'http'; import { CloudFrontConfig } from '../types'; export type IncomingMessageWithBodyAndCookies = IncomingMessage & { body: any; cookies: Record<string, string>; }; export declare function convertToCloudFrontEvent(req: IncomingMessageWithBodyAndCookies, config: CloudFrontConfig, injectedHeadersFile?: string): CloudFrontRequestEvent;