Skip to content

Commit

Permalink
use falcon App instead of deprecated API directly enable cors for fal…
Browse files Browse the repository at this point in the history
…con app (linkedin#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
  • Loading branch information
diegocepedaw authored Jan 5, 2023
1 parent fe66a1d commit ad841c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion e2e/test_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def authenticate(self, username, password):
def setUp(self):
super(TestLogin, self).setUp()
login.auth_manager = self.DummyAuthenticator()
api = falcon.API(middleware=[
api = falcon.App(middleware=[
ReqBodyMiddleware(),
])
api.req_options.auto_parse_form_urlencoded = False
Expand Down
2 changes: 1 addition & 1 deletion src/oncall/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def init_falcon_api(config):
]
if config.get('require_auth'):
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.set_error_serializer(json_error_serializer)
application.req_options.strip_url_path_trailing_slash = True
Expand Down

0 comments on commit ad841c3

Please sign in to comment.