是否可以看到闪亮的微光应用程序的代码 [英] Is is possible to see the code for shiny glimmer apps

查看:52
本文介绍了是否可以看到闪亮的微光应用程序的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这更多是代码安全性问题,而不是直接与编码相关的问题.但我想知道是否可以在 ui.Rserver.R 中看到代码并生成应用程序 Web 浏览器页面?

Hi this is more question of code security, rather than a question about a directly coding related problem. But I was wondering is it possible to see the code in ui.R and the server.R and that generates the app web browser page?

例如虽然我确定我可以让 Garrett 查看代码……是否有可能在未经授权的情况下以某种方式查看与此 URL 相关的代码 http://glimmer.rstudio.com/gsee/TFX/ 哪个正在运行一个闪亮的应用程序?因为如果放置敏感数据/代码等,这可能是一个问题.

e.g. Although I'm sure I could just ask Garrett to see the code...is it possible, without authorisation, to somehow see the code related to this URL http://glimmer.rstudio.com/gsee/TFX/ which is running the a shinny app? As this might be a problem if putting up sensitive data/code etc.

有没有办法为闪亮的应用程序添加安全的用户名和密码?以便只有选定的用户才能访问该应用?

Is there a way to add a secure username and password to shinny apps? so that only selected users can access the app?

我知道很明显你可以从 gist 看到运行闪亮应用的代码,但对闪亮的应用更感兴趣.

I know obviously you can see code that run shinny apps from gists, but was more curious about glimmer apps.

附言Garrett(如果你看到这个),我只是把你的应用作为一个很好的应用示例......因为它使用了 glimmer......,在我看来它的代码很有吸引力.

P.S. Garrett (if you see this), im just using your app as a good app example...as it uses glimmer..., and in my opinion its attractive code.

推荐答案

当您谈论在 glimmer.rstudio.com 上运行的闪亮应用程序时,您谈论的是在闪亮服务器上运行的应用程序(在与通过调用 runApp 在本地运行的应用程序相反.

As you talk about shiny applications that run on glimmer.rstudio.com, you talk about applications that run on shiny server (in contrary to applications run locally via a call to runApp).

这样,ui.Rserver.R 都位于服务器上,运行时它们不会下载到您的计算机上.此外,它们似乎受到了 Shiny 的保护,就好像您尝试通过 URL 访问它们一样,例如 http://shinyserver.example.com/app/server.R,您将得到的只是 HTTP 404 错误.

A such, both ui.R and server.R are located on the server, and they are not downloaded to your computer when you run it. Moreover, they seem to be protected by shiny, as if you try to access them via an URL, such as http://shinyserver.example.com/app/server.R, all you will get is an HTTP 404 error.

因此,就像无法访问支持网站或 Web 应用程序的 PHP 或 Ruby 文件一样,出于明显的安全原因,您也无法访问闪亮应用程序背后的 R 文件.

So, in the same way that it is not possible to access the PHP or Ruby files that power a website or web applications, you can't, for obvious security reasons, access the R files behind a shiny application.

至于保护对闪亮应用程序的访问,我不确定它是否是闪亮服务器中的内置功能,但如果您在 Apache 或 Nginx 代理后面运行它,应该可以为此使用 HTTP 身份验证.

As for protecting access to a shiny application, I'm not sure it is a builtin feature in shiny server yet, but if you run it behind an Apache or Nginx proxy it should be possible to use HTTP authentication for that.

注意:我根本不是一个闪亮的专家,所以这个答案可能有部分错误.我只是希望不是完全:)

Note : I'm not a shiny expert at all, so this answer could be partially wrong. I just hope not totally :)

这篇关于是否可以看到闪亮的微光应用程序的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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