summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNir Magnezi <nmagnezi@redhat.com>2017-08-01 13:09:08 +0300
committerNir Magnezi <nmagnezi@redhat.com>2017-08-01 13:10:01 +0300
commitb26e22499c74a5f3077078c2f9524d6432714985 (patch)
tree7ad3a76665214d55a3f6e4bae4e9157a04a87c81
parent7757d22f123063e3bb3390a98227df0789161830 (diff)
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
Notes
Notes (review): Code-Review+2: Francesco Longo <flongo@unime.it> Code-Review+2: Giovanni Merlino <gmerlino@unime.it> Workflow+1: Giovanni Merlino <gmerlino@unime.it> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 16 Aug 2017 09:14:24 +0000 Reviewed-on: https://review.openstack.org/489552 Project: openstack/iotronic Branch: refs/heads/master
-rw-r--r--iotronic/api/app.py2
1 files changed, 1 insertions, 1 deletions
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):
122 # Create a CORS wrapper, and attach iotronic-specific defaults that must be 122 # Create a CORS wrapper, and attach iotronic-specific defaults that must be
123 # included in all CORS responses. 123 # included in all CORS responses.
124 app = cors_middleware.CORS(app, CONF) 124 app = cors_middleware.CORS(app, CONF)
125 app.set_latent( 125 cors_middleware.set_defaults(
126 allow_headers=[base.Version.max_string, base.Version.min_string, 126 allow_headers=[base.Version.max_string, base.Version.min_string,
127 base.Version.string], 127 base.Version.string],
128 allow_methods=['GET', 'PUT', 'POST', 'DELETE', 'PATCH'], 128 allow_methods=['GET', 'PUT', 'POST', 'DELETE', 'PATCH'],