Skip to content

Commit f61c211

Browse files
author
Alê Borba
committed
Adicionando crossdomain.xml para aplicações .swf
resolve #71
1 parent b383ba8 commit f61c211

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

PostmonServer.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import bottle
44
import json
55
import xmltodict
6-
from bottle import route, run, response
6+
from bottle import route, run, response, template
77
from CepTracker import CepTracker
88
import requests
99
from correios import Correios
@@ -175,6 +175,12 @@ def track_pack(provider, track):
175175
bottle.mount('/v1', app_v1)
176176

177177

178+
@app_v1.route('/crossdomain.xml')
179+
def crossdomain():
180+
response.content_type = 'application/xml'
181+
return template('crossdomain')
182+
183+
178184
def _standalone(port=9876):
179185
run(host='0.0.0.0', port=port)
180186

views/crossdomain.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0"?>
2+
<cross-domain-policy>
3+
<allow-access-from domain="*"/>
4+
</cross-domain-policy>

0 commit comments

Comments
 (0)