开发者

Can you use an HTTP redirect to reference a crossdomain.xml file for Flash?

开发者 https://www.devze.com 2023-03-22 19:47 出处:网络
We have a lot of crossdomain.xml files at my company. Every service that has Flash availability needs one. Keeping them in sync is annoying, so I\'d like to be able to have just one crossdomain.xml fi

We have a lot of crossdomain.xml files at my company. Every service that has Flash availability needs one. Keeping them in sync is annoying, so I'd like to be able to have just one crossdomain.xml file hosted somewhere, and then http redirect (302) all the requests to that central location. Is this possible? I can't find documentation anywhere on the web about the rules.

I found one answer here: http://answers.unity3d.com/questions/55288/webplayer-crossdomain-in-sub-directory.html but I am not sure where he gets his info from. I don't开发者_StackOverflow中文版 see any security reason why a redirect would be disallowed (since you equally have to control the server to get it to serve a redirect as to serve a file). So secondarily, if the answer to this is that you cannot 302, I would be curious as to why not.


I know this question is a little stale, but the answer you found is correct. If the Flash player gets a crossdomain.xml from a 302 redirect, it will ignore it. From Adobe:

Note: When serving a policy file, you must not use a cross-domain redirect, or the player will ignore the policy file.

I've seen it suggested here and here that the thing to do is follow the redirect, and then make a new request, but I've never needed to try it.

0

精彩评论

暂无评论...
验证码 换一张
取 消