diff --git a/types/helmet/helmet-tests.ts b/types/helmet/helmet-tests.ts index 20a453cdaf..0e71d8ce81 100644 --- a/types/helmet/helmet-tests.ts +++ b/types/helmet/helmet-tests.ts @@ -232,7 +232,8 @@ function noSniffTest() { * @summary Test for {@see helmet#referrerPolicy} function. */ function referrerPolicyTest() { - app.use(helmet.referrerPolicy({ policy: 'same-origin' })) + app.use(helmet.referrerPolicy({ policy: 'same-origin' })); + app.use(helmet.referrerPolicy({ policy: ['no-referrer', 'origin', 'strict-origin', 'strict-origin-when-cross-origin'] })); } /** diff --git a/types/helmet/index.d.ts b/types/helmet/index.d.ts index ec6fced62d..27c4230170 100644 --- a/types/helmet/index.d.ts +++ b/types/helmet/index.d.ts @@ -168,7 +168,7 @@ declare namespace helmet { } export interface IHelmetReferrerPolicyConfiguration { - policy?: string; + policy?: string | string[]; } export interface IHelmetXssFilterConfiguration {