Skip to content

Commit

Permalink
Merge pull request #72 from CodingForChange/crossdomain
Browse files Browse the repository at this point in the history
Adicionando crossdomain.xml para aplicações .swf resolve #71
  • Loading branch information
aleborba committed Jan 2, 2014
2 parents b383ba8 + f61c211 commit b5adecb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion PostmonServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import bottle
import json
import xmltodict
from bottle import route, run, response
from bottle import route, run, response, template
from CepTracker import CepTracker
import requests
from correios import Correios
Expand Down Expand Up @@ -175,6 +175,12 @@ def track_pack(provider, track):
bottle.mount('/v1', app_v1)


@app_v1.route('/crossdomain.xml')
def crossdomain():
response.content_type = 'application/xml'
return template('crossdomain')


def _standalone(port=9876):
run(host='0.0.0.0', port=port)

Expand Down
4 changes: 4 additions & 0 deletions views/crossdomain.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*"/>
</cross-domain-policy>

0 comments on commit b5adecb

Please sign in to comment.