1.3.0 • Published 1 year ago
@calvin_von/plugin-request-hijack v1.3.0
plugin-request-hijack
A dalao-proxy for hijacking asynchronous requests to do more cool things. Mostly rewrite requests url to local dalao-proxy server.
only support dalao-proxy > 1.x
Usage
Install dalao-proxy cli first
npm install -g dalao-proxyInstall plugin
globally
dalao-proxy plugin install -g @calvin_von/plugin-request-hijacklocally
dalao-proxy plugin install -D @calvin_von/plugin-request-hijack
Add config
"requestHijack": {
"enable": true,
"prefix": "",
"smartInfer": true,
"rewrite": [
{ "from": "...", "to": "...", }
]
}Start proxy
$ dalao-proxy start
...
> npm run startConfig
prefix
Add prefix for all rewrite urls.
smartInfer
If rewrite not provided, smartInfer set to true will auto infer rewrite config from proxyTable of base config.
rewrite
- from: A string or
RegExpstring to match URLs - to: A string or
RegExpreplace string to rewrite URLs
more docs about dalao-proxy, see CalvinVon/dalao-proxy on Github.
1.2.0
1 year ago
1.1.0
1 year ago
1.3.0
1 year ago
1.2.1
1 year ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
3 years ago
1.0.0-beta.2
3 years ago
1.0.0-beta.3
3 years ago
1.0.0-beta
4 years ago
1.0.0-beta.1
4 years ago
1.0.0-alpha
4 years ago