1

I'm running an an ubuntu vm - django is running under apache2 behind nginx

I need to setup crossdomain.xml - currently getting 'access denied' etc when trying to play flash movs

whats the best way to set this up?

zack
  • 3,198
  • 2
  • 35
  • 51

3 Answers3

2

You could also try django-flashpolicies, which will construct the XML for you. It does serve the crossdomain.xml file via Django, which will be less efficient than serving it statically.

Carl Meyer
  • 122,012
  • 20
  • 106
  • 116
1

Another solution is create view in your app where you handle requests from flash:

def crossdomain(request, **kwargs):
    return render(request, 'crossdomain.xml', {})

Put crossdomain.xml in your templates dir, and add pattern to urls.py:

(r'^crossdomain.xml', 'projectname.appname.views.crossdomain')

(it's not good for production servers until you use cache over django).

whncode
  • 429
  • 3
  • 15
1

You can let nginx serve the crossdomain.xml for you. you can find an example config here.

this is more efficient and site-wide if you like.

jujule
  • 11,125
  • 3
  • 42
  • 63