Created
April 12, 2017 06:00
-
-
Save ibare/de494cd90d2f8a0a9c11713dbd30cede to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.all('/v1/*', (req, res) => { | |
request[req.method.toLowerCase()]({ | |
url: config.ApiServer+req.url, | |
headers: { | |
'Authorization': req.headers['authorization'], | |
'Content-Type': req.headers['content-type'] | |
}, | |
qs: req.query, | |
json: req.body | |
}, (err, response, body) => { | |
res.status(response.statusCode).send(body); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment