Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
#静态服务
$ ksr-serve --help
Usage: ksr-serve [options]
Options:
-p, --port [port] start port (default: 8089)
-h, --host [host] start port (default: 127.0.0.1)
--proxy [proxy] proxy file , default ".proxy.js" (default: .proxy.js)
-s, --static [static] static dir , 逗号分隔 , 默认是当前目录下的dist (default: dist)
-h, --help output usage information
.ksr.serve.conf.js
文件 , **此文件需要在线上环境运行, dev 环境也会使用此配置 , 如设置不能再线上运行需要注意判断线上线下环境 **, 所有在此文件中添加的模块依赖需要添加到 package.json
的 dependencies
选项中 具体参数 如下所示:module.exports = {
//webpack-hot-client
hot:{},
//webpack-dev-middleware
dev:{},
static:[],
middleware:[],
proxy: { //[http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware#options)
"/api": "http://localhost:3000",
"/api1": {
target: "http://localhost:3000",
pathRewrite: {"^/api" : ""}
},
"/api2": {
target: "https://other-server.example.com",
secure: false
},
"/api3": {
target: "http://localhost:3000",
bypass: function(req, res, proxyOptions) {
if (req.headers.accept.indexOf("html") !== -1) {
console.log("Skipping proxy for browser request.");
return "/index.html";
}
}
}
}
}
注意需要压缩的话,tree shaking请使用NODE_ENV=production ksr build
FAQs
The npm package ksr-serve receives a total of 7 weekly downloads. As such, ksr-serve popularity was classified as not popular.
We found that ksr-serve 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.