Skip to content

Instantly share code, notes, and snippets.

var util = require('util'),
http = require('http'),
httpProxy = require('http-proxy');
function request_handler(proxy, req, res) {
// http(s) requests.
proxy.web(req, res, function (err) {
console.log(err.stack);
res.writeHead(502);
res.end("There was an error. Please try again");
{"filter":
{"and":[
{"or":[
{"prefix":{"name":"hugo"}},
{"prefix":{"contact":"hugo"}}
]},
{"term":{"region":"europe"}}
],
"not":{
"ids":{"values":"wd4e4gcd84h2e2da9b"}