
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
koa-combo-parse
Advanced tools
一个简单的koa中间件, 用于解析combo的url.
npm install koa-combo-parse --save
const path = require('path');
const app = require('koa')();
const comboParse = require('koa-combo-parse');
app.use(comboParse({
miniCSS: true,
base: path.resolve(__dirname, './htdocs')
}));
标识是否压缩CSS
, 默认为false
.
提供两种方式标识是否压缩CSS
全局设置
miniCSS
之后,会忽略_mcss
的值. 若压缩出现异常, 则会返回未压缩的代码
miniCSS
为true
, 则所有combo的css都会压缩之后输出到客户端_mcss
字段,设置为true
或y
, 则该url对应的文件压缩后输出例:
// 第一种情况(两个URL中解析出的CSS, 均会做压缩处理)
http://www.ooxx.com/??a.css,b.css&_mcss=true
http://www.ooxx.com/??a.css,b.css
// 第二种情况(前两个URL解析出的CSS会做压缩处理)
http://www.ooxx.com/??a.css,b.css&_mcss=true
http://www.ooxx.com/??a.css,b.css&_mcss=y
http://www.ooxx.com/??a.css,b.css&_mcss=1
http://www.ooxx.com/??a.css,b.css
静态资源根目录(解析结果会拼接该目录和pathname作为文件所在目录)
以上方demo中的配置为例
目标URL: http://www.ooxx.com/js/lib/??a.js,b.js,c.js
path.resolve(__dirname, './htdocs') => /home/ooxx/www/htdocs
/home/ooxx/www/htdocs/js/lib/a.js
/home/ooxx/www/htdocs/js/lib/b.js
/home/ooxx/www/htdocs/js/lib/c.js
url中只会获取?
开头的数据, 即http://www.ooxx.com/js/lib/??a.js,b.js,c.js&_=12323
中&
后的数据会被抛弃(使用过程中, 应避免在query里出现多个以?
开头的数据)
DEBUG=koa-combo-parse
FAQs
简单的koa模块, 解析combo的url.
The npm package koa-combo-parse receives a total of 0 weekly downloads. As such, koa-combo-parse popularity was classified as not popular.
We found that koa-combo-parse demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.