swfupload 不允许我从一台服务器上传到另一台服务器

发布于 2024-09-18 05:23:31 字数 1232 浏览 4 评论 0原文

我们有两个网络服务器,并且我们在这两个服务器之间专门执行任务。 我们决定将所有 asp/aspx 页面放入一台服务器中,并将 upload.aspx + sql 服务器放入另一台服务器中:

这是服务器的名称:

http://server1.somecompany.com // 这是所有页面所在的位置 + swfupload

http://server2.somecompany.com // 这是 upload.aspx 和 sql server 所在的位置

,这是 add_item.asp 中的代码,

SWFUpload.onload = function () {
    var audio_settings = {
        flash_url : "../script/swfupload.swf",
        upload_url: "http://server2.somecompany.com/upload.aspx", // this is where swfupload from server1 call server 2
        post_params: {
            "ASPSESSID" : "{CDDAF2E2-1178-4465-9842-E54751DE8664}",
            "HELLO-WORLD" : "Here I Am",
            "section" : "sound"
        },

当我单击时 swfupload 将从 server2 调用 upload.aspx上传按钮 swfupload 尝试将我的页面重定向到 server2.somecompany.com 并且无法正确完成其工作,

但是当我将 upload_url 更改为类似以下内容时:

http://server1.somecomapny.com

一切正常

我知道这是关于 swfupload 中的安全问题,他们已经像这样解决了它,但这种固定让我们感到茫然。

我能做什么呢?

问候。

we have two webserver and we have dedicated the task between these two servers.
we've decided to put all the asp/aspx page into one server and put an upload.aspx + sql server into another one:

and here is name of the servers :

http://server1.somecompany.com // this is where all the pages reside + swfupload

http://server2.somecompany.com // this is where upload.aspx and sql server resides

and here is the code inside add_item.asp where swfupload gonna call upload.aspx from server2

SWFUpload.onload = function () {
    var audio_settings = {
        flash_url : "../script/swfupload.swf",
        upload_url: "http://server2.somecompany.com/upload.aspx", // this is where swfupload from server1 call server 2
        post_params: {
            "ASPSESSID" : "{CDDAF2E2-1178-4465-9842-E54751DE8664}",
            "HELLO-WORLD" : "Here I Am",
            "section" : "sound"
        },

when I click upload button swfupload tries to redirect my page to server2.somecompany.com and doesn't do its job properly

but when I change the upload_url : to someting like :

http://server1.somecomapny.com

everything works fine

I know it is something about security issue in swfupload and they have solved it like this but this fixation makes us dazed .

what can I do about it?

regards.

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

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

发布评论

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

评论(1

高跟鞋的旋律 2024-09-25 05:23:34

这是 Flash 中的一项安全措施。不过,您可以将远程服务器配置为接受这些请求,方法是在服务器的 HTML 根目录中包含一个名为 crossdomain.xml 的文件。

该文件应如下所示:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>

  <allow-access-from domain="[ YOUR SOURCE DOMAIN HERE ]" to-ports="80" />

</cross-domain-policy>

如果您必须允许从任何地方进行访问,请将“[ YOUR SOURCE DOMAIN HERE ]”替换为星号“*”。

欲了解更多信息,请阅读此处:www.adobe.com/devnet/flashplayer/articles/cross_domain_policy.html

祝你好运!

This is a security measure in Flash. You can configure your remote server to accept these requests, however, by including a file called crossdomain.xml in your server's HTML root.

The file should look something like this:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>

  <allow-access-from domain="[ YOUR SOURCE DOMAIN HERE ]" to-ports="80" />

</cross-domain-policy>

If you must allow access from everywhere, replace "[ YOUR SOURCE DOMAIN HERE ]" with an asterisk "*".

For more information, read here: www.adobe.com/devnet/flashplayer/articles/cross_domain_policy.html

Good luck!

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