Johnny
Johnny

Reputation: 1983

Specific File Allowed crossdomain.xml

How can I restrict access to only xml.php (or if not that then the path: /api/*)

To any domain?

I've only found how to do domains but not paths or files.

Upvotes: 0

Views: 1033

Answers (1)

Lars Blåsjö
Lars Blåsjö

Reputation: 6127

Citing the link below:

Step 6: Granular Control of Subdirectories: A cross domain policy file will control access to the directory it resides in, and all the subdirectories beneath it. This is how placing a "allow all" policy file at your domain root allows access to your entire domain. But there may be situations where you want to only allow access to a certain subdirectory. With the latest versions of the Flash Player this requires two XML files. First you need to place a crossdomain.xml file in the root of your domain that allows Flash to process additional cross domain policy files within the subdirectories.

So as understand it, you could allow access to the /api/ path only, using two policy files, one in the root and one in the api directory.

http://blancer.com/tutorials/30030/quick-tip-a-guide-to-cross-domain-policy-files/

Upvotes: 1

Related Questions