Skip to content

Instantly share code, notes, and snippets.

@furlanf
Created November 5, 2019 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save furlanf/f1228397c860f9071a542e2b6154a1ff to your computer and use it in GitHub Desktop.
Save furlanf/f1228397c860f9071a542e2b6154a1ff to your computer and use it in GitHub Desktop.
const middy = require('middy');
const { httpSecurityHeaders, httpErrorHandler } = require('middy/middlewares');
module.exports = (handler) => {
 return middy(handler).use(httpSecurityHeaders())
  .use(httpErrorHandler());
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment