Closed guoshencheng closed 5 years ago
我的坑。。这个是bug
Merging #50 into master will increase coverage by
0.2%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #50 +/- ##
=========================================
+ Coverage 95.92% 96.13% +0.2%
=========================================
Files 30 30
Lines 491 491
=========================================
+ Hits 471 472 +1
+ Misses 20 19 -1
Impacted Files | Coverage Δ | |
---|---|---|
lib/middlewares/referrerPolicy.js | 100% <100%> (+9.09%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 6ba7024...0c6634c. Read the comment docs.
Merging #50 into master will increase coverage by
0.2%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #50 +/- ##
=========================================
+ Coverage 95.92% 96.13% +0.2%
=========================================
Files 30 30
Lines 491 491
=========================================
+ Hits 471 472 +1
+ Misses 20 19 -1
Impacted Files | Coverage Δ | |
---|---|---|
lib/middlewares/referrerPolicy.js | 100% <100%> (+9.09%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 6ba7024...2a26ca4. Read the comment docs.
+1
这个PR还有什么问题么?
2.4.2
不知道是不是理解错了,这里的
ALLOWED_POLICIES_ENUM
是用于校验设定的referrer-policy
是否合法的,而源代码只有数组下标才会进入判断
比如
'origin' in ALLOWED_POLICIES_ENUM
返回false
'oorigin' in ALLOWED_POLICIES_ENUM
也返回false
'0' in ALLOWED_POLICIES_ENUM
返回true
这就失去了判断的意义