Preview Box Content from within Xamarin Forms
I'm trying to integrate content hosted within Box directly into a Xamarin Forms application (Targeting both iOS and Android). I've got a companion web application that uses the JS UI Elements preview component, that works quite well.
I see that there are iOS and Android SDKs (and have also come across Xamarin.iOS and Xamarin.Android plugins) but in the interest of simplifying the code for a relatively small feature in the app, I was looking at using a WebView to display the JS UI Elements preview component. I've gotten stuck with the CORS policy as the request from the WebView on the mobile device reports the origin as null, which I cannot add into the white-list for the Box App.
Are there any workarounds that will allow me to bypass the CORS checking for my mobile application?
-
Hi ,
Typically the method that sites use to get around this is to use * as the domains to allow. Box specifically disallows this for security reasons, as it opens up the site to a number of potential attack vectors.
I believe if you can adjust the headers of requests going to Box to inject a "Access-Control-Allow-Origin" header in, that should solve the problem.
- Jon
Please sign in to leave a comment.
Comments
1 comment