View on GitHub


A collection of middleware for AWS lambda functions.


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.


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