I\'ve written a small proxy with nodejs, express and htt-proxy. It works well for serving local files but fails when it comes to proxy to external api:
var e
I ended up using http-proxy-middleware.
The code looks something like this:
var express = require("express"); var proxy = require("http-proxy-middleware"); const theProxy = proxy({ target: "query.yahooapis.com", changeOrigin: true, }); app.use("/", theProxy); app.listen(process.env.PORT || 3002);