[IMP] Use CORS in pos (only two routes)
bzr revid: fme@openerp.com-20140130122752-kfgo7u0q0crn3tbr
This commit is contained in:
parent
b63b03abd0
commit
9ce7c7d561
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue