summaryrefslogtreecommitdiff
path: root/addons/hw_proxy/controllers/main.py
diff options
context:
space:
mode:
authorFabien Meghazi <fme@openerp.com>2014-01-30 13:27:52 +0100
committerFabien Meghazi <fme@openerp.com>2014-01-30 13:27:52 +0100
commit9ce7c7d561ba3f2aff9f2eafda1c8dffd05e8b1f (patch)
tree41fe21750d3b75b9876fce85002685e6dd2c9ae2 /addons/hw_proxy/controllers/main.py
parentb63b03abd0c8109faa32803d2ae32663e1b64133 (diff)
[IMP] Use CORS in pos (only two routes)
bzr revid: fme@openerp.com-20140130122752-kfgo7u0q0crn3tbr
Diffstat (limited to 'addons/hw_proxy/controllers/main.py')
-rw-r--r--addons/hw_proxy/controllers/main.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/addons/hw_proxy/controllers/main.py b/addons/hw_proxy/controllers/main.py
index adb59a072b3..e6c19e322d6 100644
--- a/addons/hw_proxy/controllers/main.py
+++ b/addons/hw_proxy/controllers/main.py
@@ -33,16 +33,11 @@ class Proxy(http.Controller):
statuses[driver] = drivers[driver].get_status()
return statuses
- @http.route('/hw_proxy/hello', type='http', auth='none')
+ @http.route('/hw_proxy/hello', type='http', auth='none', cors='*')
def hello(self):
- return request.make_response('ping', {
- 'Cache-Control': 'no-cache',
- 'Content-Type': 'text/html; charset=utf-8',
- 'Access-Control-Allow-Origin': '*',
- 'Access-Control-Allow-Methods': 'GET',
- })
+ return "ping"
- @http.route('/hw_proxy/handshake', type='json', auth='none')
+ @http.route('/hw_proxy/handshake', type='json', auth='none', cors='*')
def handshake(self):
return True