简体   繁体   English

HTML5桌面框架(松弛)浏览器安全性

[英]HTML5 desktop frameworks (relaxed) browser security

I have a question regarding the (relaxed) browser security of app.js as i have read somewhere in documentation (i tried searching for it but could not find it). 我有一个关于app.js(松弛)浏览器安全性的问题,因为我在文档中的某个地方已经读过(我尝试搜索它,但找不到它)。 I do see that there is an option that can be set here: https://github.com/appjs/appjs/blob/master/docs/index.md 我确实看到可以在此处设置一个选项: https : //github.com/appjs/appjs/blob/master/docs/index.md

I have started building a desktop application using adobe AIR using Starling and Feathers UI because the service i am building the app for ( Pinboard ) does not have CORS enabled and will not do so in the future ( see this google group chat about it ). 我已经开始使用Starling and Feathers UI使用Adobe AIR构建桌面应用程序,因为我正在为( Pinboard )构建应用程序的服务未启用CORS,将来也不会启用( 请参阅与此Google群组聊天 )。 However, i would like to start with (node-webkit / App.js / similar HTML5 desktop framework) as well, just to see how that goes (and also i believe that building good transitional interfaces is a lot easier and faster in HTML5 nowadays). 但是,我也想从(node-webkit / App.js /类似的HTML5桌面框架)开始,只是为了了解它的发展过程(而且我相信,如今在HTML5中构建良好的过渡界面要容易得多,而且速度更快) )。

My generalized question is: will app.js and other HTML5 desktop application frameworks allow me to circumvent CORS requirements? 我的普遍性问题是:app.js和其他HTML5桌面应用程序框架是否可以让我规避CORS要求? I am trying to find more concrete information about the browser security settings but i can not find it. 我试图找到有关浏览器安全设置的更多具体信息,但我找不到它。 Any pointer to such information (of different desktop application frameworks) will be greatly appreciated! 指向(不同的桌面应用程序框架的)此类信息的任何指针将不胜感激!

Michael 迈克尔

On the "server" side of your app, you are running Node.js, which does not enforce any CORS restrictions. 在应用程序的“服务器”端,您正在运行Node.js,它没有实施任何CORS限制。 That's a browser thing, Node.js is just a JavaScript runtime. 那是浏览器,Node.js只是一个JavaScript运行时。

On the client side of your app though, you might suffer from CORS, that depends on the runtime/framework and I couldn't find anything about App.js either. 但是在应用程序的客户端,您可能会遭受CORS的困扰,这取决于运行时/框架,我也找不到关于App.js的任何信息。 But you could simply proxy requests to Pinboard through the server side, which would work around all CORS issues. 但是您可以简单地通过服务器端将请求代理到Pinboard,这可以解决所有CORS问题。 There are a quite a few proxy servers for Node.js that could be used for this purpose, like node-http-proxy . 有许多用于Node.js的代理服务器可用于此目的,例如node-http-proxy

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM