1

I am using a JavaFX WebView (with ui4j library) to load a website. But I get this error in one of the urls that I am loading..

Access Denied

You don't have permission to access "{url}" on this server.
Reference #18.9d086a7c.1518661853.652b53a

It works on normal browsers. e.g. Chrome, Firefox, Safari. But with my java browser it doesn't.

Now I am aware that this is some sort of an apache-issue but I want to have a work around on this since I don't have control over this website.

Additionally I have a custom SSL verification to check on whitelisted issuers. I also tried previously to disable the SSLVerification.

But to no luck, the issue still persists.

Aaron
  • 2,591
  • 4
  • 27
  • 45
  • 1
    If the server denies you access, it denies you access. You can't work around that with client side code. – James_D Feb 15 '18 at 03:31
  • Well basically it works on normal browsers. e.g. Chrome, Firefox, Safari. But with my java browser it doesn't. So somehow I was thinking that there is some possible workaround for this. – Aaron Feb 15 '18 at 03:32
  • 1
    OK: maybe you could mention that in the question? As your question stands, all you are asking is how you can get access to a site that denies you access, which is not a problem that has a general solution (for obvious reasons). If all you want to do is make a web site think that `WebView` is a different browser than the one it is, you just need to set the user agent header in the request. See https://stackoverflow.com/questions/45292054/detect-javafx-webview – James_D Feb 15 '18 at 03:33
  • I am setting the userAgent to chrome's "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36". And the issue still persists. – Aaron Feb 15 '18 at 03:45

0 Answers0