-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: misc router #552
feat: misc router #552
Conversation
elrrrrrrr
commented
Jul 17, 2023
- 🧶 拦截 audit 相关接口 ref
- ♻️ 默认 404 GET 接口不做额外处理
- 🧶 Intercept audit-related interfaces ref
- ♻️ No additional processing for default 404 GET interfaces.
Codecov Report
@@ Coverage Diff @@
## master #552 +/- ##
==========================================
- Coverage 97.02% 96.97% -0.06%
==========================================
Files 174 174
Lines 16641 16658 +17
Branches 2183 2185 +2
==========================================
+ Hits 16146 16154 +8
- Misses 495 504 +9
|
@HTTPMethod({ | ||
path: '/*', | ||
method: HTTPMethodEnum.POST, | ||
priority: -Infinity, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这算黑魔法么
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前似乎没有其他方式实现,z-index:1000
😄
|
||
const startTime = new Date(); | ||
|
||
const NOT_IMPLEMENTED = [ '/-/npm/v1/security/audits/quick', '/-/npm/v1/security/advisories/bulk' ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为啥要这样黑名单?这样不在黑名单里面的 post 不是也会被攻击么。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些是标记目前暂不支持的方法,返回 501 更贴切一些
其余方法仍默认返回 404