e8c47a0d
V2EX  ›  Node.js

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

  •  
  •   e8c47a0d · Oct 9, 2017 · 3734 views
    This topic created in 3209 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   ·   1127 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 18:04 · PVG 02:04 · LAX 11:04 · JFK 14:04
    ♥ Do have faith in what you're doing.