如何禁用“组件浏览器”在冷聚变中?
我已经注释掉了 RDS \JRun4\servers\[name]\cfusion.ear\cfusion.war\WEB-INF\web.xml
但是,RDS 选项卡仍然存在于 CF 管理器中,并且仍然浏览到 CFC将我重定向到 /CFIDE/componentutils/cfcexplorer.cfc
如何在 ColdFusion 中禁用“组件浏览器”?
谢谢
I already commented out the RDS in \JRun4\servers\[name]\cfusion.ear\cfusion.war\WEB-INF\web.xml
However, the RDS tab is still there in the CF Administrator, and browsing to a CFC still redirect me to /CFIDE/componentutils/cfcexplorer.cfc
How to disable "Component Browser" in ColdFusion?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您不希望 CFC 可供浏览,请勿将它们放在可浏览的目录中! Web 服务器只应公开您想要浏览的文件。
我认为这里的问题不在于 CFC 资源管理器的功能,而在于您在可浏览位置中有不想浏览的内容。
If you don't want your CFCs to be browseable, don't put them in a directory that's browseable! Only files you intend to be browseable ought to be exposed by the web server.
I think the problem here is not the CFC explorer's functionality, it's that you've got stuff you don't want to be browsed to in a browseable location.
“组件浏览器”无法禁用——它是 ColdFusion 的一项硬连线功能,当您向 .CFC 所在的完整位置发出 Web 请求时,它会自动触发——并且与 RDS 无关,无论是否启用或不。
您必须决定一种防止直接访问 CFC 的方法,并以这种方式实施。此类选项包括:
禁用 CFC 的“自动文档”,如 Henry 提供的帖子中所述如上所述(来源:Ray Camden)。
从任何面向公众的网站中删除 /CFIDE 虚拟映射,以便直接 .CFC Web 请求会导致 HTTP 500(因为 cfcexplorer 将不再可访问)。
一个更巧妙的选择是让您的面向公众的网站使用不同的虚拟 /CFIDE 目录:
在该目录中,创建一个名为“componentutils”的文件夹。
, 4. 在“componentutils”中,创建一个文件“cfcexplorer.cfc”,然后您将使用该文件进行单个调用,并向浏览器返回 403(禁止)代码:
此选项很好,因为您不仅可以通过组件浏览器的隐式功能隐藏 CFC,使其无法直接访问,还可以向公众隐藏您的 CF 管理员(许多 CF 站点经常忘记这一点)。
The "Component Browser" cannot be disabled--it is a hard-wired function of ColdFusion, which automatically fires when you make a web request to the full location where a .CFC resides--and is unrelated to RDS, whether it is enabled or not.
You will have to decide upon a methodology that you want to approach to prevent direct access to your CFCs, and implement it that way, instead. Such options are:
Disabling the "auto-documentation" of a CFC, as described in the post provided by Henry above (Source: Ray Camden).
Remove the /CFIDE virtual mapping from any of your public facing websites, so that a direct .CFC web request results in a HTTP 500 (as cfcexplorer will no longer be accessible).
A slicker option altogether is to make your public-facing websites use a different virtual /CFIDE directory:
Within that directory, create a folder called "componentutils".
, 4. Within "componentutils", create a single file, "cfcexplorer.cfc", which you will then use to make a single call, and return a 403 (Forbidden) code to the browser:
<cfheader statuscode="403" statustext="Forbidden" />
This option is good, because you not only hide your CFCs from direct access via the implicit functionality of the Component Browser, you also hide your CF Administrator from the public (which many CF sites often forget about).
您不能删除/重命名 cfcexplorer.cfc 吗?
Can't you just delete/rename the cfcexplorer.cfc?