I have simple ionic app with one page with iframe inside. The source of iframe is index.html located in assets folder. (Import by ionic studio)
I need to do application (android and ios) that communicates with the device. Device have simple TCP server and the response is JSON.
Index.html send XMLHttpRequests to this device.
If I have TCP server (Hercules) on local PC I receive request from adroid, ios and ionic serve in browser. All is OK.
When I connect do device (device have softAP) and change the IP address of XMLHttpRequests. The communication do not work on android and ios. Ionic serve do not work too and in Console: Access to XMLHttpRequest at ‘http://192.168.136.1/api/state’ from origin ‘null’ has been blocked by CORS policy: No ‘Acccess-Control-Allow-Origin’ header is present on the requested resource.
I try add address to network_security_config.xml
I have access origin="*" in config.xml
What can I try to do? Please help