How to disable web security (crossover) in webkit gtk

I am trying to write a browser of a specific site for several sites and am encountering a problem with webkitgtk. WebKitGtk blocks some cross-domain request as a security measure, and there is no way to disable it in the WebKitGtk API

A simple Python example

from gi.repository import Gtk, WebKit window = Gtk.Window() webview = WebKit.WebView() webview.load_uri('http://drive.google.com') window.add(webview) window.show_all() Gtk.main() 

Output:

  ** Message: console message: @0: Unable to post message to https://0.drive.google.com. Recipient has origin https://drive.google.com. 
+1
source share
2 answers

Impossible at the moment. Error: https://bugs.webkit.org/show_bug.cgi?id=58378

+1
source

The only setting that seems relevant to me is enable-xss-auditor :

 settings = WebKit.WebSettings() settings.set_property('enable-xss-auditor', False) webview.set_settings(settings) 
0
source

Source: https://habr.com/ru/post/1265234/


All Articles