hariprakashnagar commented on issue #1004:
URL: 
https://github.com/apache/cordova-android/issues/1004#issuecomment-2037086721

   > > Is it possible to change app://localhost to http://localhost/ on Cordova 
ios >6. We are facing an issue with Cross Origin because app://localhost is not 
a valid domain.
   > 
   > Short answer is this isn't possible.
   > 
   > On iOS the 
[WKURLSchemeHandler](https://developer.apple.com/documentation/webkit/wkurlschemehandler?language=objc)
 is the backing API and only allows you to use a scheme that is not already 
registered. This means that all well known standard schemes like `http` or 
`https` is automatically not supported by the iOS API.
   > 
   > On Android, the 
[WebViewAssetLoader](https://developer.android.com/reference/androidx/webkit/WebViewAssetLoader)
 is the backing API and it only supports setting either `http` or `https` as 
the scheme. So this creates a situation where you cannot make the two platforms 
consistent.
   > 
   > Your backend must either enable all domains using a wildcard for the 
`Access-Control-Allow-Origin` response header, or your backend must read the 
request's `Origin` header and dynamically set the `Access-Control-Allow-Origin` 
response header accordingly if the `Origin` is a value that you expect.
   
   Yes, we can do this but PDF embed viewer does not work with Web view [Mobile 
browser] if we use from hosted URL.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to