12345678910111213141516171819202122232425262728 |
-
- var http = require('http');
- var httpProxy = require('http-proxy');
- var proxy = httpProxy.createProxyServer({
- });
- proxy.on("error", function(err, req, res, urla){
-
- res.write(JSON.stringify(err,true,2));
- res.end();
- })
- http.createServer(function(req, res) {
- req.url = '/wp-json/metrics';
- proxy.web(req, res, { target: 'http://192.168.1.61:9118' });
- }).listen(9117);
|