在R中为Distill和/或Quarto网站创建用户/密码登录。

huangapple go评论67阅读模式
英文:

Creating a user/password login for Distill and/or Quarto website in R

问题

我目前正在通过R创建一个distill网站(希望能过渡到Quarto,但仍然使用distill)。目前,R代码与GitHub连接,用于发布网站,这主要是为了我们部门内部使用。如果网站链接泄露出去,会存在公开可访问性的担忧。

我想知道是否有一种方法可以在R代码中构建一种分配给我们人员的用户名和密码的方式,这将在有人访问链接时强制启用登录门户。

我对通过R进行网站开发相当新,所以一个示例将非常有帮助!谢谢!

英文:

I am currently creating a distill website through R (hopefully to transition to Quarto, but still using distill). Currently, the R code is connected with GitHub to publish the website, and this will mainly be for internal use within my department. There is concern with the public availability if the website's link gets out.

I was wondering if there was a way to build into the R code a way to assign usernames and passwords for our personnel, which will force a login portal when someone accesses the link.

I am fairly new to allow of this website development through R, so an example would be very helpful! Thanks!

答案1

得分: 1

为了管理凭据,您需要服务器端代码。GitHub Pages是静态的,所以没有服务器供您运行。

您有几个选择:

  1. 将网站托管在服务器上,并使用类似于 htaccess 文件 这样的方式管理访问。
  2. GitHub 页面设置为私有。请注意,您随后需要为需要访问的人提供仓库的读取权限,这意味着他们需要拥有 GitHub 登录。
英文:

To manage credentials, you need server-side code. GitHub Pages is static, so there's no server for you to run it on.

You have a couple of options:

  1. Host the site on a server and manage access using something like a htaccess file
  2. Change the GitHub page to be private. Note that you'd then need to give anyone who needs access read access to the repo, which would mean that they would need to have a GitHub login.

huangapple
  • 本文由 发表于 2023年7月14日 09:21:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/76684154.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定