Installations
npm install koa-server-http-proxy
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
8.11.3
NPM Version
5.6.0
Score
69.8
Supply Chain
77.5
Quality
68
Maintenance
50
Vulnerability
99.3
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (84.26%)
HTML (15.74%)
validate.email 🚀
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Developer
eugeneCN
Download Statistics
Total Downloads
287,630
Last Day
251
Last Week
2,618
Last Month
12,916
Last Year
93,880
GitHub Statistics
38 Stars
8 Commits
2 Forks
1 Branches
1 Contributors
Updated on Jun 17, 2024
Bundle Size
247.43 kB
Minified
73.79 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.1.0
Package Id
koa-server-http-proxy@0.1.0
Unpacked Size
34.41 kB
Size
9.96 kB
File Count
7
NPM Version
5.6.0
Node Version
8.11.3
Total Downloads
Cumulative downloads
Total Downloads
287,630
Last Day
-62.9%
251
Compared to previous day
Last Week
-25.6%
2,618
Compared to previous week
Last Month
44.3%
12,916
Compared to previous month
Last Year
36.6%
93,880
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Dev Dependencies
2
koa-server-http-proxy
A koa2 http-proxy-middleware.
Installation
1$ npm install koa-server-http-proxy --save
Example
1const Koa = require('koa') 2 3const app = new Koa() 4 5const proxy = require('koa-server-http-proxy') 6 7app.use(proxy('/api', { 8 target: 'https://news-at.zhihu.com', 9 pathRewrite: { '^/api': 'api/4/' }, 10 changeOrigin: true 11})) 12 13app.listen(3000) 14 15
Browser
http://127.0.0.1:3000/api/themes
Example2
1const Koa = require('koa') 2 3const app = new Koa() 4 5const proxy = require('koa-server-http-proxy') 6 7const proxyTable = { 8 '/json': { 9 target: 'http://jsonplaceholder.typicode.com', 10 pathRewrite: { '^/json': '' }, 11 changeOrigin: true 12 }, 13 '/api': { 14 target: 'https://news-at.zhihu.com', 15 pathRewrite: { '^/api': 'api/4/' }, 16 changeOrigin: true 17 } 18} 19 20Object.keys(proxyTable).forEach((context) => { 21 var options = proxyTable[context] 22 app.use(proxy(context, options)) 23}) 24 25app.listen(3000) 26 27
Options
All options are passed to http-proxy-middleware
, except that if options is passed
as a string, it will normalized as options' target.
See http-proxy-middleware for full list of accepted options.
License
MIT

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 0/8 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
21 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q
- Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-6x33-pw7p-hmpq
- Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27
- Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp
- Warn: Project is vulnerable to: GHSA-593f-38f6-jp5m
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9
- Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp
- Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr
- Warn: Project is vulnerable to: GHSA-29xr-v42j-r956
Score
1.3
/10
Last Scanned on 2025-02-24
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More