Skip to main content
Participating Frequently
July 19, 2009
Question

Limiting access to FMS

  • July 19, 2009
  • 2 replies
  • 1157 views

Hi,

i'd want to allow SWF applications which reside on a specific site to connect to my FMS , and refuse connection to the other ones.

I have read that it suffices to edit the vhost.xml file writing my site's domain in the <Allow> tag.  I've tried to do so, just after having installed FMS, but the result is that i can't connect to FMS from my site, while if i write "all" in the <Allow> tag, it connects (from all domains).

What am i missing? Is there a simple tutorial about this?

    This topic has been closed for replies.

    2 replies

    Participating Frequently
    July 20, 2009

    i forgot one thing: the SWF is in the same domain as the page

    July 20, 2009

    Are you certain that you're accessing www.mywiicenter.com and not mywiicenter.com? You might want to try adding both in the allowed list

    <Allow>mywiicenter.com,www.mywiicenter.com</Allow>

    Participating Frequently
    July 20, 2009

    Tried as you said, and restarted FMS service. Still doesn't work

    then i've put "all" in place of the domains, and it worked.

    I could try defining a mine vod application which checks the http referer, but i have Flash Media Streaming Server, can i define new applications with it or i need the Interactive Server?

    Does it suffices to do this to define a new vod?

    1) copy the vod application as is in another application

    2) modify the "main.asc" file adding the code that controls the domain

    July 20, 2009

    Can you post what you're entering into the XML file? Pehaps there's a syntax problem.

    This is something I personally prefer to do at the application level. In your server side actionscript, you can inspect the client.referrer and client.pageUrl properties to determine the address of the .swf, and the address of the page the .swf is embeded in. You can then apply your own logic to accepting or rejecting connections.

    Participating Frequently
    July 20, 2009

    Here it is an excerpt of the file.

    The <Allow> tag is the only thing i've modified :


    <!-- This tag specifies a comma delimited list of domains that are   -->
    <!-- allowed to connect to this vhost. If this tag is empty, then    -->
    <!-- only connections from the same domain that is being connected   -->
    <!-- to will be allowed. If this tag is not empty, then only the     -->
    <!-- domains explicitly listed will be accepted. For example,        -->
    <!-- <Allow>macromedia.com, yourcompany.com</Allow> will only allow  -->
    <!-- connections from the macromedia.com & yourcompany.com domains.  -->
    <!-- If you wish to allow localhost connections, you will specify    -->
    <!-- "localhost". For example, <Allow>localhost</Allow>. To allow    -->
    <!-- all domains, specify "all".  For example, <Allow>all</Allow>.   -->
    <Allow>www.mywiicenter.com</Allow>

    I have a page, on the site specified in <Allow>, with an SWF that shows a video on demand, taken from the "media" subfolder of the VOD application.

    The FMS is in a different server.

    When there it was "all" in place of my site, the connection were established, and i watched the video.

    Now, the swf can't connect from either my site nor from any other one (i've also tried putting the swf on a different webserver with another domain name).

    The FMS administration console tells me that a connection was attempted, but it was refused (see image below):

    http://159.149.131.107/img.png

    And i've tried both with IE7 and Opera 9.

    I think there's a simpler way than rewriting the VOD application , isn't it?