rdoc 生成的文档可公开访问

发布于 2024-12-28 18:35:44 字数 85 浏览 2 评论 0原文

我已经让 rdoc 生成我的项目的文档,但现在我想让它们可以从应用程序访问,以便允许(登录的用户)可以从我的站点访问/查看它们。

提前致谢。

I have make rdoc to generate the documentation of my project but now i would like to make them accessible from application so allowed (logged in users) can access/view them from my site.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

删除→记忆 2025-01-04 18:35:44

那么,您正在运行什么类型的应用程序?如果它类似于 MVC(或具有路由层),您可能可以指定某种类型的挂钩或从控制器提供它们,以便路径 doc/由控制器处理它将执行用户身份验证,然后提供用户请求的任何静态文件。

您还可以将所有内容放入占据整个窗口的 IFrame 中(实际上不应该可见),并且您可以为 IFrame 服务器端提供服务并在其中包含您的身份验证。

实际上有很多方法可以防止未经授权的用户访问您的文档。这实际上取决于您对什么感到满意。

Well, what type of application are you running? If it's something like MVC (or has a routing layer) you could probably specify some type of hook or serve them from a controller such that the path doc/<rdoc-files> was handled by a controller that would perform user-auth and then serve whatever static file the user is requesting.

You could also put everything into an IFrame that takes up the whole window (and really shouldn't be visible) and you could serve the IFrame server-side and include your authentication there.

There are really many ways in which you could prevent un-authorized users from accessing your documentation. It really just depends on what you are comfortable with.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文