CFIDE的解决方法AJAX和Flash内置函数不支持Web访问 [英] Workaround for CFIDE Not Web Accessible for AJAX and Flash Built-Ins
问题描述
ColdFusion的多个功能 - 媒体播放器和多文件上传器 - 基于 / CFIDE / scripts
下可用的JavaScript库,即使 scriptsrc
在 Application.cfc
中配置。请参阅此处的错误以获得参考点: http://www.elliottsprehn.com/cfbugs/bugs / 83328
Several pieces of ColdFusion functionality - media player and multi file uploader - are predicated on JavaScript libraries being available at /CFIDE/scripts
, even if the scriptsrc
is configured in Application.cfc
. See the bug here for a point of reference: http://www.elliottsprehn.com/cfbugs/bugs/83328
不幸的是,从ColdFusion安装中暴露CFIDE目录是一种安全风险。所以我试图决定正确的路径,使我的应用程序使用这个功能,而不暴露这个洞。皱纹是我正在运送一个产品,所以我试图想象一个解决方案,我可以使用安装程序或文档自动化足够容易,系统管理员应该没有设置麻烦。
Unfortunately exposing the CFIDE directory as-is from a ColdFusion installation is a security risk. So I'm trying to decide the right path forward to enable my application's use of this functionality whilst not exposing this hole. The wrinkle is that I am shipping a product so I am trying to imagine a solution that I can either automate with an installer or document easily enough that a system administrator should have no trouble setting up.
这些是我想出的选项:
- ,或者有安装程序,创建一个空目录并虚拟映射为
/ CFIDE
。从其下的ColdFusion安装中复制scripts
文件夹的内容。 - 仅分发需要修改的文件,并确保引用的.swfs位于更改的位置(路径相对于CFIDE / scripts):
- Document to, or have the installer, create an empty directory and virtually map it as
/CFIDE
. Copy the contents of thescripts
folder from the ColdFusion installation beneath it. - Distribute just the files I need modified and ensure the referenced .swfs are in the whatever location it's changed to (paths are relative to CFIDE/scripts):
-
/ajax/package/cffileupload_swf.js
-
/ ajax / package / cfmediaplayer .js
/ajax/package/cffileupload_swf.js
/ajax/package/cfmediaplayer.js
哪个选项好?或者你有一个更好的主意?
Which option seems better? Or do you have a better idea?
推荐答案
您可以简单地映射完整的scripts文件夹。而不是map / CFIDE,map / CFIDE / scripts。这将暴露脚本文件夹,但/ CFIDE根本不存在。
You could simply map the full scripts folder. Rather than map /CFIDE, map /CFIDE/scripts. This would expose the scripts folder, but /CFIDE wouldn't exist at all.
另一个类似的选项是将scripts文件夹复制到common / CFIDE / scripts映射到此文件夹。
Another similar option is to copy the scripts folder to somewhere "common" and again create a /CFIDE/scripts mapping to this folder.
这两个解决方案几乎完全相同,但第二个可能更适合真正的偏执。
Both of these solutions are virtually identical, but the second is probably better for the truly paranoid.
这篇关于CFIDE的解决方法AJAX和Flash内置函数不支持Web访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!