2
votes

I have a flex app running on my server.

I have had a request from some clients to have the swf loaded on their server, so that their customers dont have to be transferred to my server to login; i.e. from the user's point of view it looks like they are logging in from theirsite.com instead of mysite.com

I tried something really simple, and that was to give them a html wrapper to host on their site. The only modification that I made was to change the "src" var to:

"src", "https://www.mysite.com/app/myapp.swf" and embed src="https://www.mysite.com/app/myapp.swf"

To my surprise, this worked perfectly. And best of all, the service calls still seem to come from mysite.com, so I dont have to bother with modifying the crossdomain.xml file.

All good it seems.

Are there any issues or downsides to the above that I should be aware of?

1

1 Answers

2
votes

If you're doing an ExternalInterface calls to JavaScript in the enclosing page, this may cause a security error; since the SWF from your domain shouldn't be able to access HTML content served from your client's domain.

I expect that is a fringe case though. Aside from that, what you're doing is not much different than what YouTube does. I've done the same thing with The Flex Show player. I don't think you'll have any issues. And I do not believe that this approach makes your app any less (or less) secure.