Flash unable to request swf files from another sub-domain within the same web server.
I just experienced an issue with flash loading other swf files in the same web server but requesting from another sub-domain.
For example:
http://www.mywebsite.com/flash/shell.swf is requesting http://mywebsite.com/flash/game.swf
The crossdomain.xml is not issue. This is configured to allow * all access.
The website path is provided to shell.swf via a param. If I change the param to provide “http://www.mywebsite.com” it will work when the user is using www.mywebsite.com. This is very weir because everything is stored in the same location is just an issue with host headers.
I solved this issue my simply providing the current url host header to the shell.swf via the param.
So if the user is using “www” I will use www.mywebsite.com. If the user is using “origin.mywebsite.com”, then flash will use origin.mywebsite.com.
I am not sure 100% why flash is unable to request files from other sub-domains. But this was the quickest solution to this problem.
No comments:
Post a Comment