You've already forked oncall
mirror of
https://github.com/linkedin/oncall.git
synced 2025-11-27 23:18:38 +02:00
use falcon App instead of deprecated API directly enable cors for falcon app (#386)
* upgrade to python 3.10 * readd irisclient * python 3.10 updates * readd falcon-cors * flake8 * remove streql * fix login tests * teak dependencies * use falcon App instead of API * update login test
This commit is contained in:
@@ -55,7 +55,7 @@ class TestLogin(TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestLogin, self).setUp()
|
super(TestLogin, self).setUp()
|
||||||
login.auth_manager = self.DummyAuthenticator()
|
login.auth_manager = self.DummyAuthenticator()
|
||||||
api = falcon.API(middleware=[
|
api = falcon.App(middleware=[
|
||||||
ReqBodyMiddleware(),
|
ReqBodyMiddleware(),
|
||||||
])
|
])
|
||||||
api.req_options.auto_parse_form_urlencoded = False
|
api.req_options.auto_parse_form_urlencoded = False
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ def init_falcon_api(config):
|
|||||||
]
|
]
|
||||||
if config.get('require_auth'):
|
if config.get('require_auth'):
|
||||||
middlewares.append(AuthMiddleware())
|
middlewares.append(AuthMiddleware())
|
||||||
application = falcon.API(middleware=middlewares)
|
application = falcon.App(middleware=middlewares, cors_enable=True)
|
||||||
application.req_options.auto_parse_form_urlencoded = False
|
application.req_options.auto_parse_form_urlencoded = False
|
||||||
application.set_error_serializer(json_error_serializer)
|
application.set_error_serializer(json_error_serializer)
|
||||||
application.req_options.strip_url_path_trailing_slash = True
|
application.req_options.strip_url_path_trailing_slash = True
|
||||||
|
|||||||
Reference in New Issue
Block a user