New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@middy/http-security-headers

Package Overview
Dependencies
Maintainers
3
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@middy/http-security-headers - npm Package Compare versions

Comparing version 2.0.0-alpha.0 to 2.0.0-alpha.1

8

index.js

@@ -0,1 +1,3 @@

"use strict";
// Code and Defaults heavily based off https://helmetjs.github.io/

@@ -128,7 +130,9 @@ const defaults = {

const httpSecurityHeadersMiddlewareAfter = async handler => {
handler.response = handler.response ?? {
var _handler$response, _handler$response$hea, _handler$response2;
handler.response = (_handler$response = handler.response) !== null && _handler$response !== void 0 ? _handler$response : {
statusCode: 500
}; // catch thrown errors, prevent default statusCode
handler.response.headers = handler.response?.headers ?? {};
handler.response.headers = (_handler$response$hea = (_handler$response2 = handler.response) === null || _handler$response2 === void 0 ? void 0 : _handler$response2.headers) !== null && _handler$response$hea !== void 0 ? _handler$response$hea : {};
Object.keys(helmet).forEach(key => {

@@ -135,0 +139,0 @@ const config = { ...defaults[key],

{
"name": "@middy/http-security-headers",
"version": "2.0.0-alpha.0",
"version": "2.0.0-alpha.1",
"description": "Applies best practice security headers to responses. It's a simplified port of HelmetJS",

@@ -15,2 +15,3 @@ "type": "commonjs",

"types": "index.d.ts",
"files": [],
"scripts": {

@@ -50,3 +51,3 @@ "test": "npm run test:typings && npm run test:unit",

"homepage": "https://github.com/middyjs/middy#readme",
"gitHead": "e047c0d3db00aa11b39f2d3e193458ea021a58a0"
"gitHead": "f8b0f418477cdbff47da693963bf1ea918b39d04"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc