Post

Replies

Boosts

Views

Activity

OHTTP with WKWebView not working as expected
I am trying out the new ProxyConfiguration API for OHTTP and didn't get the expected result. I was using it with WKWebView. I have a relay test server that blocks requests to certain urls instead of forwarding them to the gateway. So for example if the user loads test-blocked.com in the web view they'd get an error, while test-allowed.com would be forwarded to the gateway and the website would be loaded. Now in my test using the code from the Ready, set, relay presentation the website would be loaded for both urls (blocked & allowed) and the relay was not hit at all. If I understand the ProxyConfiguration correctly allowFailover is set to false by default which means if anything is wrong (config or otherwise) no content should be loaded for any given url. Is that assumption correct? I tried using the URLSession example as well with the same result. Is the ProxyConfiguration API supposed to work in Beta 2? Are there any gotchas I have to look out for to make this work? Any help or pointers would be appreciated.
3
1
966
Jun ’23