mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-13 05:20:25 +00:00
Merge pull request #33507 from chdanielmueller/helmet-hsts-option-spelling
[helmet] Fix spelling of a option in hsts and hpkp
This commit is contained in:
@@ -119,6 +119,13 @@ function hpkpTest() {
|
||||
sha256s: ['AbCdEf123=', 'ZyXwVu456='],
|
||||
}));
|
||||
|
||||
app.use(helmet.hpkp({
|
||||
maxAge: 7776000000,
|
||||
sha256s: ['AbCdEf123=', 'ZyXwVu456='],
|
||||
includeSubDomains: false
|
||||
}));
|
||||
|
||||
// Deprecated: Use includeSubDomains instead. (Uppercase "D")
|
||||
app.use(helmet.hpkp({
|
||||
maxAge: 7776000000,
|
||||
sha256s: ['AbCdEf123=', 'ZyXwVu456='],
|
||||
@@ -128,7 +135,7 @@ function hpkpTest() {
|
||||
app.use(helmet.hpkp({
|
||||
maxAge: 7776000000,
|
||||
sha256s: ['AbCdEf123=', 'ZyXwVu456='],
|
||||
includeSubdomains: true
|
||||
includeSubDomains: true
|
||||
}));
|
||||
|
||||
app.use(helmet.hpkp({
|
||||
@@ -162,6 +169,12 @@ function hstsTest() {
|
||||
maxAge: 7776000000,
|
||||
}));
|
||||
|
||||
app.use(helmet.hsts({
|
||||
maxAge: 7776000000,
|
||||
includeSubDomains: true
|
||||
}));
|
||||
|
||||
// Deprecated: Use includeSubDomains instead. (Uppercase "D")
|
||||
app.use(helmet.hsts({
|
||||
maxAge: 7776000000,
|
||||
includeSubdomains: true
|
||||
|
||||
Vendored
+9
-1
@@ -1,6 +1,6 @@
|
||||
// Type definitions for helmet
|
||||
// Project: https://github.com/helmetjs/helmet
|
||||
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher>, Evan Hahn <https://github.com/EvanHahn>, Elliot Blackburn <https://github.com/bluehatbrit>
|
||||
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher>, Evan Hahn <https://github.com/EvanHahn>, Elliot Blackburn <https://github.com/bluehatbrit>, Daniel Müller <https://github.com/chdanielmueller>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -134,7 +134,11 @@ declare namespace helmet {
|
||||
export interface IHelmetHpkpConfiguration {
|
||||
maxAge: number;
|
||||
sha256s: string[];
|
||||
/**
|
||||
* @deprecated Use includeSubDomains instead. (Uppercase "D")
|
||||
*/
|
||||
includeSubdomains?: boolean;
|
||||
includeSubDomains?: boolean;
|
||||
reportUri?: string;
|
||||
reportOnly?: boolean;
|
||||
setIf?: IHelmetSetIfFunction;
|
||||
@@ -142,7 +146,11 @@ declare namespace helmet {
|
||||
|
||||
export interface IHelmetHstsConfiguration {
|
||||
maxAge?: number;
|
||||
/**
|
||||
* @deprecated Use includeSubDomains instead. (Uppercase "D")
|
||||
*/
|
||||
includeSubdomains?: boolean;
|
||||
includeSubDomains?: boolean;
|
||||
preload?: boolean;
|
||||
setIf?: IHelmetSetIfFunction;
|
||||
force?: boolean;
|
||||
|
||||
@@ -95,13 +95,13 @@ function hpkpTest() {
|
||||
app.use(helmet.hpkp({
|
||||
maxAge: 7776000000,
|
||||
sha256s: ['AbCdEf123=', 'ZyXwVu456='],
|
||||
includeSubdomains: false
|
||||
includeSubDomains: false
|
||||
}));
|
||||
|
||||
app.use(helmet.hpkp({
|
||||
maxAge: 7776000000,
|
||||
sha256s: ['AbCdEf123=', 'ZyXwVu456='],
|
||||
includeSubdomains: true
|
||||
includeSubDomains: true
|
||||
}));
|
||||
|
||||
app.use(helmet.hpkp({
|
||||
@@ -137,7 +137,7 @@ function hstsTest() {
|
||||
|
||||
app.use(helmet.hsts({
|
||||
maxAge: 7776000000,
|
||||
includeSubdomains: true
|
||||
includeSubDomains: true
|
||||
}));
|
||||
|
||||
app.use(helmet.hsts({
|
||||
|
||||
Reference in New Issue
Block a user