New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebView feature suggestion: custom URI scheme and resource domain #48
Comments
Hi Alex Someone else had a similar problem and we solved it with this commit: Does that work for you? |
Unfortunately not. I believe that would fix CORS issues for navigation requests, but then you run into cross-origin problems when those resources make requests via XHR/fetch from javascript. As far as I can tell, aside from making changes to the back-end to send the appropriate CORS headers to the allowed origin, the only ways around this on the client side are:
|
I have a change in my branch that supports a user-provided options customUriScheme, customUriHome (following the pattern of userAgent) to specify the scheme and domain. Change was quite simple and can be seen here: I originally implemented it as an #ifdef, but found the need for multiple schemes within the same runtime. |
I've implemented this with a few differences, but should do what you need. Let me know if it gives you any trouble.. |
When using the WebView with the
fetchResource
option, we get blocked by CORS security protection when web resources make HTTP requests to our back-end services. In order to be deliberate about what origin those services see and allow, something we've implemented in our fork is the ability to override the components of the URI scheme:choc://
application URI scheme andchoc.choc
domainchoc.localhost
domainThis doesn't implement Linux, but just thought I'd drop it here in case you may find it useful: splice#1
Thanks!
The text was updated successfully, but these errors were encountered: