As I don’t know your code for sure, I will give you only an explanation of how I think you could solve the problem, please do not consider this the real answer, just try :)
I sometimes had this problem, and usually you can fix it on your server using the CORS function, depending on the server application / structure you are using, you use this CORS differently, but basically you need to fill in the response header from the server following the relevant information:
Access-Control-Allow-Origin Access-Control-Allow-Methods Access-Control-Allow-Headers
A very "open" configuration will be:
"Access-Control-Allow-Origin=* "Access-Control-Allow-Methods=GET, POST, PUT, DELETE, OPTIONS "Access-Control-Allow-Headers=Content-Type, Authorization
source share