V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
e8c47a0d
V2EX  ›  Node.js

为什么 express 中要用 helmet 而不直接自己用 app.use 设置 header?

  •  
  •   e8c47a0d · Oct 9, 2017 · 3555 views
    This topic created in 3122 days ago, the information mentioned may be changed or developed.
    helmet 用了很多 dependencies,而每个 dependencies 几乎都是只设置 header 而已,那么为什么不直接自己设置,如果只是为了方便……
    2 replies    2017-10-09 13:07:12 +08:00
    rekey
        1
    rekey  
       Oct 9, 2017   ❤️ 1
    不负责任猜测,大概是你不需要知道是啥头。记很简单的选项就可以搞定。
    e8c47a0d
        2
    e8c47a0d  
    OP
       Oct 9, 2017
    原来如此啊……
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1161 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 23:15 · PVG 07:15 · LAX 16:15 · JFK 19:15
    ♥ Do have faith in what you're doing.