Page 1 of 1
Server-side check for what site an .swf is hosted on?
Posted: 12 Apr 2006, 16:52
by Ack
Is there any way to make the SmartFox server check for what website a .swf that connects is being played from? For example, to only allow .swf's hosted on
www.mysite.com to connect the the SmartFox server?
Thanks!
Posted: 13 Apr 2006, 05:27
by Lapo
No, not directly from SmartFoxServer.
That information can be "captured" from inside thw SWF file using the
_url property
However there's a nice "trick" you can use.
In version 1.4.0 we've added a new tag: <PolicyAllowedDomains>
which allows to specify only the domains from which the swf is allowed to connect to the server.
Example:
Code: Select all
<PolicyAllowedDomains>
<AllowedDomain>gotoandplay.it</AllowedDomain>
<AllowedDomain>smartfoxserver.com</AllowedDomain>
</PolicyAllowedDomains>
This allows only SWFs coming from those 2 domains to connect to my server, all the others will be refused.
More infos here:
http://www.smartfoxserver.com/docs/docP ... basics.htm
hope it helps