REST API Calls from inside CEP are canceled
Hello all!
It's been 2 days since I'm stuck in this problem. I'll describe it:
I have a CEP extension inside Adobe InDesign 2020, using CEP 8.0, inside a Windows 10 Oracle virtualbox machine, that is inside a Linux native computer. In this extension, I am using VueJS (that proved itself (to me) working good inside CEP env) and within that single-page-application I am using the superagent library (can be found here https://www.npmjs.com/package/superagent) to fetch some data from a REST API service hosted inside my linux machine.
Thefore, I have:
A Linux machine running a REST API service.
A Windows inside a virtual machine with Adobe Indesign and an extension trying to access the REST API Service using superagent library.
I hope I was clear enough.
And when I hit the button to fire up the request, I get this error in the debugger (google chrome):
Error: Request has been terminated
Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.
at Request.crossDomainError (client.js:655)
at XMLHttpRequest.xhr.onreadystatechange (client.js:758)
When I look into the network tab on the chrome tools debugger thing, it shows up the 'canceled' status for the request. I.e., it is just not sending the request. The browser (CEP chromium engine) is just blocking it.
I thought it would be a CORS problem. But then I runned the application inside the normal chrome browser and it worked perfectly. Also, my server, as a open REST API config, accepts all origins.
The question is: why is the request being blocked? Am I not allowed to fire up requests within the application? Do I need something else for it like, for example, an embedded nodejs server to do that?
I appreciate any thoughts that might come up about this.
Best Regards,
An old Owl.
