Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@httpland/hsts-middleware

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@httpland/hsts-middleware - npm Package Compare versions

Comparing version 1.0.0-beta.1 to 1.0.0-beta.2

esm/utils.js

2

esm/deps.js
// Copyright 2023-latest the httpland authors. All rights reserved. MIT license.
// This module is browser compatible.
export { stringify, } from "./deps/deno.land/x/hsts_parser@1.0.0-beta.1/mod.js";
export { stringify, } from "@httpland/hsts-parser";
export var SecurityHeaders;

@@ -5,0 +5,0 @@ (function (SecurityHeaders) {

// Copyright 2023-latest the httpland authors. All rights reserved. MIT license.
// This module is browser compatible.
import "./_dnt.polyfills.js";
export { hsts } from "./middleware.js";
export { STS } from "./utils.js";

@@ -6,3 +6,3 @@ {

"name": "@httpland/hsts-middleware",
"version": "1.0.0-beta.1",
"version": "1.0.0-beta.2",
"description": "HTTP Strict Transport Security(HSTS) middleware",

@@ -43,3 +43,7 @@ "keywords": [

}
},
"dependencies": {
"@httpland/hsts-parser": "1.0.0-beta.1",
"@httpland/http-middleware": "1.0.0"
}
}

@@ -6,3 +6,3 @@ # hsts-middleware

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/httpland/hsts-middleware)](https://github.com/httpland/hsts-middleware/releases)
[![codecov](https://codecov.io/github/httpland/hsts-middleware/branch/main/graph/badge.svg)](https://codecov.io/gh/httpland/hsts-middleware)
[![codecov](https://codecov.io/gh/httpland/hsts-middleware/branch/main/graph/badge.svg?token=ERELj74qaQ)](https://codecov.io/gh/httpland/hsts-middleware)
[![GitHub](https://img.shields.io/github/license/httpland/hsts-middleware)](https://github.com/httpland/hsts-middleware/blob/main/LICENSE)

@@ -102,2 +102,21 @@

## Preset
STS presets are provided. It is value recommended by several hosts.
- [OWASP](https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Strict_Transport_Security_Cheat_Sheet.html)
- [mozilla](https://infosec.mozilla.org/guidelines/web_security#http-strict-transport-security)
```ts
import { hsts, STS } from "https://deno.land/x/hsts_middleware@$VERSION/mod.ts";
const middleware = hsts(STS);
```
yield:
```http
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
```
## Effects

@@ -104,0 +123,0 @@

@@ -6,4 +6,4 @@ "use strict";

exports.SecurityHeaders = exports.stringify = void 0;
var mod_js_1 = require("./deps/deno.land/x/hsts_parser@1.0.0-beta.1/mod.js");
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return mod_js_1.stringify; } });
var hsts_parser_1 = require("@httpland/hsts-parser");
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return hsts_parser_1.stringify; } });
var SecurityHeaders;

@@ -10,0 +10,0 @@ (function (SecurityHeaders) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hsts = void 0;
// Copyright 2023-latest the httpland authors. All rights reserved. MIT license.
// This module is browser compatible.
require("./_dnt.polyfills.js");
Object.defineProperty(exports, "__esModule", { value: true });
exports.STS = exports.hsts = void 0;
var middleware_js_1 = require("./middleware.js");
Object.defineProperty(exports, "hsts", { enumerable: true, get: function () { return middleware_js_1.hsts; } });
var utils_js_1 = require("./utils.js");
Object.defineProperty(exports, "STS", { enumerable: true, get: function () { return utils_js_1.STS; } });

@@ -1,5 +0,5 @@

export { type Middleware } from "./deps/deno.land/x/http_middleware@1.0.0/mod.js";
export { type StrictTransportSecurity, stringify, } from "./deps/deno.land/x/hsts_parser@1.0.0-beta.1/mod.js";
export { type Middleware } from "@httpland/http-middleware";
export { type StrictTransportSecurity, stringify, } from "@httpland/hsts-parser";
export declare const enum SecurityHeaders {
StrictTransportSecurity = "strict-transport-security"
}

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

import "./_dnt.polyfills.js";
export { hsts } from "./middleware.js";
export { type Middleware, type StrictTransportSecurity } from "./deps.js";
export { STS } from "./utils.js";
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