Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable the Same Origin Policy / making cross domain XMLHttpRequests in WebKit WebViews?

I would like to disable the same origin policy on XMLHttpRequests in my own embedded WebViews. I have control over the pages loaded / code being executed in the WebView, so I do not care about enforcing the same origin policy. I would like to make cross-domain requests.

I've tried implementing the WebPolicyDelegate and WebResourceLoadDelegate but they do not seem to be called for XMLHttpRequests.

like image 621
tlrobinson Avatar asked Mar 10 '10 22:03

tlrobinson


1 Answers

void WebSettingsImpl::setWebSecurityEnabled(bool enabled)
{
    m_settings->setWebSecurityEnabled(enabled);
}

Hopefully this is what you need! You can send me a message for webkit.

like image 186
Andrew Avatar answered Sep 30 '22 16:09

Andrew