GeckoFX with CORS support

Deadly 提交于 2019-12-11 08:02:51

问题


We have a desktop applicaton for private usage. This is build in C# and use GeckoFX for UI (HTML, JavaScript). We need to allow CORS, but we don't have control in webserver...

In a previous version, we use the default WebBrowser Control, what use IE for rendering. In the IE, there is a options for allow CORS (Security Settings, Miscellaneous/Access Data Sources Across Domains) but we have to use GeckoFX insted of IE.

Is there any solution to allow cross domain request in this special browser without any JS hack or proxy?

Update: There is an easy way in chrome, start witt --disable-web-security flag. Is there something similar in Firefox?


回答1:


CORS is serverside generated HTTP header. Without control over server you cannot use it. Since you cannot access server you have to hack GeckoFX source code. Luckily source available http://code.google.com/p/geckofx/source/checkout




回答2:


I got a similar problem when i was trying to access an iframe element, in my case i change Wb.Document.GetElemenstByTagName("iframe")(1) to Wb.Window.Frames(1)



来源:https://stackoverflow.com/questions/20544117/geckofx-with-cors-support

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!