Was hoping this would be smooth.
Because of remote working I was trying to find a way to test CORS just on the server side. The only thing that came up was run a Curl statement and see if headers are returned.
On a local version of the server added the following. (Some test code)
String origin = this.request.getHeader("Origin"); log.debug("Mobile Origin is " + origin); this.response.setHeader("Access-Control-Allow-Origin", origin); ...
Ran curl against it and saw the headers returned.
Move the code up to a server that could access from an iphone. The iphone has the update web view code.
Problems I’m having:
In debugging the iphone through Safari
I get the error "“Origin ionic://localhost is not allow by Access-Control-Allow-Origin”
"XMLHttpRequest cannot load https://dev.example.com/jsonws/login due to access control checks. "
Bug checking the server log output the Origin that is showing up is “https://dev.example.com” not ionic:localhost ?
Confused what is going on or where to fix it.
Added in allow-navigation href=“ionic://localhost” in config.xml but seems like that isn’t needed.
Where to do from here?