Skip to content

Commit 5ecedfa

Browse files
author
btgoodwin
committed
TODO: patched the response for options, etc. to not violate CORS
1 parent ecbb4b0 commit 5ecedfa

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

rest/crossdomain.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,19 @@
2424
Cross Domains - add access-controll-allow-origin headers to origin
2525
"""
2626

27-
import tornado.web
27+
import tornado
2828

2929
class CrossDomains(tornado.web.RequestHandler):
3030
def set_default_headers(self):
3131
self.set_header("Access-Control-Allow-Origin", "*")
32-
self.set_header("Access-Control-Allow-Headers", "x-requested-with")
32+
self.set_header("Access-Control-Allow-Headers", "x-requested-with, content-type")
3333
self.set_header('Access-Control-Allow-Methods', 'POST, GET, OPTIONS, PUT, DELETE')
3434

35+
@tornado.gen.coroutine
36+
def options(self, *args, **kwargs):
37+
pass
38+
39+
3540

3641

3742

0 commit comments

Comments
 (0)