Currently, I am facing an issue with making an AJAX POST request from a Chrome extension to my AWS app. The request is defined over http instead of https. I have made sure to incorporate the necessary CORS headers in my AWS app as seen below:
app.use(function(req, res, next) {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
next();
});
Despite setting up the CORS headers, the POST request keeps timing out from the extension with a plain "connection timed out" error message. Any suggestions on how to troubleshoot and resolve this problem?