How to use the hsts function from helmet

Find comprehensive JavaScript helmet.hsts code examples handpicked from public code repositorys.

45
46
47
48
49
50
51
52
53
54
    },
  }),
);

app.use(
  helmet.hsts({
    force: true,
    includeSubDomains: true,
    maxAge: 63072000, // 2 years
    preload: true,
fork icon85
star icon959
watch icon23

+ 5 other calls in file

34
35
36
37
38
39
40
41
42
43
//     action: "deny",
//   })
//  );
//  // strict transport secruity.
//  app.use(
//   helmet.hsts({
//     maxAge: 123456,
//     includeSubDomains: false,
//   })
//  );
fork icon0
star icon0
watch icon0