Skip to content
Snippets Groups Projects
Commit 2459c02f authored by Fuentes Serna  Juan Mariano (ID SIS)'s avatar Fuentes Serna Juan Mariano (ID SIS)
Browse files

SSDM-5310 preflight CORS calls implemented -> Now browsers can directly make...

SSDM-5310 preflight CORS calls implemented -> Now browsers can directly make calls from a different domain
parent 00857485
No related branches found
No related tags found
No related merge requests found
...@@ -11,8 +11,19 @@ from pybis import Openbis ...@@ -11,8 +11,19 @@ from pybis import Openbis
class CreateNotebook(tornado.web.RequestHandler): class CreateNotebook(tornado.web.RequestHandler):
def get(self, msg):
self.write(self.msg) def set_default_headers(self):
self.set_header("Access-Control-Allow-Origin", "*")
self.set_header("Access-Control-Allow-Headers", "x-requested-with")
self.set_header('Access-Control-Allow-Methods', 'POST, GET, OPTIONS')
def get(self):
self.write('some get')
def options(self):
# no body
self.set_status(204)
self.finish()
def post(self, whatever): def post(self, whatever):
token = self.get_argument(name='token') token = self.get_argument(name='token')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment