@lambda-middleware/frameguard

AWS lambda middleware for preventing clickjacking by using frameguards

Usage no npm install needed!

<script type="module">
  import lambdaMiddlewareFrameguard from 'https://cdn.skypack.dev/@lambda-middleware/frameguard';
</script>

README

@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);