eggjs / egg-security

Security plugin for egg, force performance too.
MIT License
238 stars 43 forks source link

refactor: use setRawHeader #2

Closed dead-horse closed 8 years ago

dead-horse commented 8 years ago

security 的东西都是开发者配置的,与输入无关,都改成用 setRawHeader 好了。

codecov-io commented 8 years ago

Current coverage is 96.31% (diff: 100%)

Merging #2 into master will not change coverage

@@             master         #2   diff @@
==========================================
  Files            28         28          
  Lines           461        461          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits            444        444          
  Misses           17         17          
  Partials          0          0          

Powered by Codecov. Last update 6b9f7e9...0bcf203

popomore commented 8 years ago

set 有啥特殊处理会影响么

dead-horse commented 8 years ago

恩,会做一堆 key 和 value 的检查,判断是否是合法值。

fengmk2 commented 8 years ago

只要不是请求决定的 value,都可以使用这个高性能的接口设置 header

fengmk2 commented 8 years ago

+1

fengmk2 commented 8 years ago

我再跑一边