oracle / cordova-plugin-wkwebview-file-xhr

Cordova Plugin for WebView File XHR
Universal Permissive License v1.0
138 stars 120 forks source link

Also support file:// urls #1

Closed vbraun closed 6 years ago

vbraun commented 7 years ago

It would be nice if absolute file:// urls were also supported (checking that they point to a resource inside the www folder, of course). For example, the AngularJS template service makes XMLHttpRequest with absolute url to load templates, which then fail. Can be worked around on the Angular side, but would be nice if it worked out of the box.

Thanks for the great plugin!

gvanmat commented 7 years ago

Thanks for the feedback.

We are about ready to release another version of the plugin that works around the "null" origin CORS header by handling remote XHR requests thru the native layer too. We will trying addressing the relative URL limitation for local XHR in this release too.

Regards, Gary

On Aug 30, 2017 3:03 AM, "Volker Braun" notifications@github.com wrote:

It would be nice if absolute file:// urls were also supported (checking that they point to a resource inside the www folder, of course). For example, the AngularJS template service makes XMLHttpRequest with absolute url to load templates, which then fail. Can be worked around on the Angular side, but would be nice if it worked out of the box.

Thanks for the great plugin!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/oracle/cordova-plugin-wkwebview-file-xhr/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AQwjU8e7jo3kc2D-8Uo9Y5ux2TTX_4vrks5sdSVKgaJpZM4PHE-Q .

vbraun commented 7 years ago

I tried the implementation that has now hit the master branch and it works nicely for me!

gvanmat commented 7 years ago

Great! We should be pushing out a public npm module soon - after finishing our internal testing.

gvanmat commented 6 years ago

Absolute file URLs were added in v2.0.0

brunoborges commented 6 years ago

Hey @gvanmat , mind to post link to change log?