ajax not working in firebase production environment but works on localhost ajax code
var settings = {
"async": true,
"crossDomain": true,
"url": "https://some_other_domain:3000/",
"method": "POST",
"dataType": "json",
"headers": {
"Access-Control-Allow-Origin" : "*",
"Access-Control-Allow-Headers" : "Origin, X-Requested-With, Content-Type, Accept",
"Access-Control-Allow-Methods" : "GET,PUT,POST,DELETE",
"Content-Type": "application/json",
"Cache-Control": "no-cache",
},
"processData": false,
"crossDomain":true,
"timeout": 3000,
"data": JSON.stringify(emailData)
}
$.ajax(settings)
.done(function (response) {
on firebase-hosting my request timeout(as seen on network tab in inspector, and console doesn't show any errors). on localhost it works fine. I tried on Mozila Firefox and Google Chrome.