1.1.0 • Published 3 years ago

@lambda-middleware/frameguard v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@lambda-middleware/frameguard

npm version downloads open issues debug build status codecov dependency status devDependency status

AWS lambda middleware for preventing clickjacking by using frameguards

Lambda middleware

This middleware is part of the lambda middleware series. It can be used independently.

Usage

import { frameguard } from "@lambda-middleware/frameguard";
import { APIGatewayProxyResult } from "aws-lambda";

// This is your AWS handler
async function helloWorld(): Promise<APIGatewayProxyResult> {
  return {
    statusCode: 200,
    body: "",
  };
}

// Wrap the handler with the middleware
export const handler = frameguard()(helloWorld);