freeCodeCamp/curriculum/challenges/chinese/06-information-security-and.../information-security-with-h.../install-and-require-helmet....

1.1 KiB
Raw Blame History

id title challengeType videoUrl localeTitle
587d8247367417b2b2512c36 Install and Require Helmet 2 安装并需要头盔

Description

提醒一下,这个项目是基于Glitch的以下入门项目构建的,或者是从GitHub克隆的。 Helmet通过设置各种HTTP标头来帮助您保护Express应用程序。安装包然后需要它。

Instructions

Tests

tests:
  - text: “helmet”依赖应该在package.json中
    testString: 'getUserInput => $.get(getUserInput("url") + "/_api/package.json").then(data => { var packJson = JSON.parse(data); assert.property(packJson.dependencies, "helmet"); }, xhr => { throw new Error(xhr.responseText); })'

Challenge Seed

Solution

// solution required