This commit is contained in:
@ -65,6 +65,10 @@ export default class ProxyRoute extends Route {
|
|||||||
headers["x-proxy-node"] = process.env.NODE_ID;
|
headers["x-proxy-node"] = process.env.NODE_ID;
|
||||||
headers["x-proxy-response-time"] = Date.now() - before + "ms";
|
headers["x-proxy-response-time"] = Date.now() - before + "ms";
|
||||||
|
|
||||||
|
// Add CORS headers
|
||||||
|
headers["access-control-allow-origin"] = "*";
|
||||||
|
headers["access-control-allow-methods"] = "*";
|
||||||
|
|
||||||
// Return the JSON response
|
// Return the JSON response
|
||||||
res.status(response.status).set(headers).json(data);
|
res.status(response.status).set(headers).json(data);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
|
Reference in New Issue
Block a user