From b26e22499c74a5f3077078c2f9524d6432714985 Mon Sep 17 00:00:00 2001 From: Nir Magnezi Date: Tue, 1 Aug 2017 13:09:08 +0300 Subject: [PATCH] Stop using deprecated CORS.set_latent() As a follow up to Icd44684b3d05ff6a07665348c08adff8245f2523 Use cors_middleware.set_defaults instead of app.set_latent Change-Id: I44e2d3d54a9b8bd3893625ddf3ff4094a8e294b9 --- iotronic/api/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iotronic/api/app.py b/iotronic/api/app.py index 76a7e69..ac6d0d9 100644 --- a/iotronic/api/app.py +++ b/iotronic/api/app.py @@ -122,7 +122,7 @@ def setup_app(config=None): # Create a CORS wrapper, and attach iotronic-specific defaults that must be # included in all CORS responses. app = cors_middleware.CORS(app, CONF) - app.set_latent( + cors_middleware.set_defaults( allow_headers=[base.Version.max_string, base.Version.min_string, base.Version.string], allow_methods=['GET', 'PUT', 'POST', 'DELETE', 'PATCH'],