I am trying (for a small personal project) to send an http (not https as I don't have it set up) to my vps running nodejs. I can send the request perfectly fine with postman, but trying to use the xmlhttprequest prints the following error to the console:
Access to XMLHttpRequest at 'http://207.154.211.105/?postBidone={%22id%22:{%22nome%22:%22esempio1%22,%22localita%22:%22esempio2%22,%22extra%22:%22esempio3%22},%22action%22:%22add%22,%22content%22:%22plastic%22}' from origin 'null' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.
Do you know a way to successfully send the request? Thanks!