QtWebkit Same-Origin Policy

I have QtWebkit ported to an Arm-based platform. We can run QtTestBrowser. I wanted to disable the policy of the same origin in the aforementioned browser.

Please let me know if anyone has an idea on this.

+5
source share
2 answers

By default, Qt does not provide a method to disable / whitelist the same origin policy. An extension of the same (qwebsecurityorigin.cpp) and the ability to make it work.

0
source

I know this is deprecated, but you can do it by changing the QWebPage settings:

auto settings = page.settings();
settings->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls,true);
settings->setAttribute(QWebSettings::LocalContentCanAccessFileUrls,true);
+3
source

All Articles