javascript - JavaFX WebView disable Same origin policy (allow cross domain requests) -


i'm developing javafx application glorified web page. it's desktop application (it's no embedded web page) , has web view main ui. application serves sole purpose of accessing bluetooth devices using bluecove because that's not possible directly javascript on web browser.

the proof of concept works ok (i able call javascript code java , vice-versa) have 1 requirement of calling arbitrary web services/api within javascript violates same origin policy (similar on android: allow remote ajax calls in android webview + jquery mobile). possible on javafx? tips?

p.s.: i'm using javafx 2.2.

basically, javafx has issue coupled cors - https://javafx-jira.kenai.com/browse/rt-35868. assuming web services using, have cors enabled can try following approach:

  • system.setproperty("sun.net.http.allowrestrictedheaders", "true")

or

  • java -dsun.net.http.allowrestrictedheaders=true <your main class here>

hope you


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -