Files
freeCodeCamp/curriculum/challenges/arabic/06-information-security-and-quality-assurance/information-security-with-helmetjs/ask-browsers-to-access-your-site-via-https-only-with-helmet.hsts.arabic.md
mrugesh 9612c5ba74 fix: HSTS test in Infosec curriculum (#37469)
Co-authored-by: Wocanilo <daniel.sese@wuolah.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2019-10-23 21:35:34 +05:30

907 B

id, title, challengeType, videoUrl, localeTitle
id title challengeType videoUrl localeTitle
587d8248367417b2b2512c3c Ask Browsers to Access Your Site via HTTPS Only with helmet.hsts() 2

Description

undefined

Instructions

undefined

Tests

tests:
  - text: ''
    testString: 'getUserInput => $.get(getUserInput("url") + "/_api/app-info").then(data => { assert.include(data.appStack, "hsts"); assert.property(data.headers, "strict-transport-security"); }, xhr => { throw new Error(xhr.responseText); })'
  - text: ''
    testString: 'getUserInput => $.get(getUserInput("url") + "/_api/app-info").then(data => { assert.match(data.headers["strict-transport-security"], /^max-age=7776000;?/); }, xhr => { throw new Error(xhr.responseText); })'

Challenge Seed

Solution

// solution required