如何禁用webkit gtk中的web安全(跨源re​​equest) [英] How to disable web security (cross origin reequest) in webkit gtk

查看:126
本文介绍了如何禁用webkit gtk中的web安全(跨源re​​equest)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为几个网站编写特定于网站的浏览器,并且面临着webkitgtk的问题。 WebKitGtk阻止了一些跨域请求作为安全措施,并且无法在WebKitGtk API中禁用它。



Python简单示例

  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()


输出:

  **消息:控制台消息:@ 0:无法将消息发布到https://0.drive.google.com。收件人的来源为https://drive.google.com。 


解决方案

现在还不行。错误: https://bugs.webkit.org/show_bug.cgi?id=58378


I'm trying to write a site specific browser for a few sites and am facing an issue with webkitgtk. WebKitGtk blocks some cross domain request as a security measure and there is no way to disable it in the WebKitGtk API

Python simple 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.

解决方案

Not possible as of now. Bug: https://bugs.webkit.org/show_bug.cgi?id=58378

这篇关于如何禁用webkit gtk中的web安全(跨源re​​equest)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆