y-server-plugin-proxy
v0.0.3
Published
y-server proxy plugin
Downloads
4
Readme
y-server-plugin-proxy
y-server-plugin-proxy is a y-server plugin to proxy request.
Install
npm install y-server-plugin-proxy
Usage
const path = require('path');
const yServer = require('y-server');
const proxyPlugin = require('y-server-plugin-proxy');
yServer({
plugins: [
proxyPlugin({
proxyPaths: ['/majax/*'],
proxyServer: 'http://m.readnovel.com',
proxyOptions: {
query: {},
headers: {},
},
}),
],
});
Notes
proxyPaths
is the Array which will be proxy.proxyServer
is the proxy server.proxyOptions
is the proxy options (see express-request-proxy).