@lambda-middleware/no-sniff
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

@lambda-middleware/no-sniff

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

A middleware for adding the content type options no-sniff header to AWS lambdas.

Lambda middleware

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

Usage

import { noSniff } from "@lambda-middleware/no-sniff";

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

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

/@lambda-middleware/no-sniff/

    Package Sidebar

    Install

    npm i @lambda-middleware/no-sniff

    Weekly Downloads

    0

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    9.09 kB

    Total Files

    11

    Last publish

    Collaborators

    • dbartholomae