Open samuelnovaes opened 3 years ago
Hi @samuelnovaes , maybe you can follow my approach: add "Access-Control-Allow-Origin": "", and "Access-Control-Allow-Methods": "" to proxy.ts
update proxy.ts to this, build & run:
const httpServer = http.createServer((req, res) => { res.writeHead(301, { "Location": "https://" + req.headers['host']! + req.url, "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Methods": "*" }); res.end(); });
My Express app has CORS enabled, but it doesn't work becouse the proxy doesn't have the CORS enabled.