From 98242af148a8b5471aa9093f888207665ca8696a Mon Sep 17 00:00:00 2001 From: xpress Date: Sat, 5 Nov 2016 22:22:01 +0530 Subject: [PATCH] cors: update default configuration Set_defaults has been added into oslo_middleware. So we use it to override the configuration defaults. Change-Id: Ic9c6278e43a66da9f94f556430944fe9b42fb1b7 --- heat/common/config.py | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/heat/common/config.py b/heat/common/config.py index b33516dc01..f58329d59f 100644 --- a/heat/common/config.py +++ b/heat/common/config.py @@ -540,23 +540,21 @@ def get_ssl_options(client): def set_config_defaults(): """This method updates all configuration default values.""" - # CORS Defaults - # TODO(krotscheck): Update with https://review.openstack.org/#/c/285368/ - cfg.set_defaults(cors.CORS_OPTS, - allow_headers=['X-Auth-Token', - 'X-Identity-Status', - 'X-Roles', - 'X-Service-Catalog', - 'X-User-Id', - 'X-Tenant-Id', - 'X-OpenStack-Request-ID'], - expose_headers=['X-Auth-Token', - 'X-Subject-Token', - 'X-Service-Token', - 'X-OpenStack-Request-ID'], - allow_methods=['GET', - 'PUT', - 'POST', - 'DELETE', - 'PATCH'] - ) + cors.set_defaults( + allow_headers=['X-Auth-Token', + 'X-Identity-Status', + 'X-Roles', + 'X-Service-Catalog', + 'X-User-Id', + 'X-Tenant-Id', + 'X-OpenStack-Request-ID'], + expose_headers=['X-Auth-Token', + 'X-Subject-Token', + 'X-Service-Token', + 'X-OpenStack-Request-ID'], + allow_methods=['GET', + 'PUT', + 'POST', + 'DELETE', + 'PATCH'] + )