cors: update default configuration in config
Set_defautls has been added into oslo.middleware, so we use it to overrive the configuration defaults. Change-Id: I9696ad8210a0ee4fee6c0f78be777a5939b221a4 Signed-off-by: Chuck Short <chuck.short@canonical.com>
This commit is contained in:
parent
cdaef22aea
commit
086b7a7de9
|
@ -12,29 +12,26 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo_config import cfg
|
|
||||||
from oslo_middleware import cors
|
from oslo_middleware import cors
|
||||||
|
|
||||||
|
|
||||||
def set_middleware_defaults():
|
def set_middleware_defaults():
|
||||||
"""Update default configuration options for oslo.middleware."""
|
"""Update default configuration options for oslo.middleware."""
|
||||||
# CORS Defaults
|
cors.set_defaults(
|
||||||
# TODO(krotscheck): Update with https://review.openstack.org/#/c/285368/
|
allow_headers=['X-Auth-Token',
|
||||||
cfg.set_defaults(cors.CORS_OPTS,
|
'X-Openstack-Request-Id',
|
||||||
allow_headers=['X-Auth-Token',
|
'X-Identity-Status',
|
||||||
'X-Openstack-Request-Id',
|
'X-Roles',
|
||||||
'X-Identity-Status',
|
'X-Service-Catalog',
|
||||||
'X-Roles',
|
'X-User-Id',
|
||||||
'X-Service-Catalog',
|
'X-Tenant-Id'],
|
||||||
'X-User-Id',
|
expose_headers=['X-Auth-Token',
|
||||||
'X-Tenant-Id'],
|
'X-Openstack-Request-Id',
|
||||||
expose_headers=['X-Auth-Token',
|
'X-Subject-Token',
|
||||||
'X-Openstack-Request-Id',
|
'X-Service-Token'],
|
||||||
'X-Subject-Token',
|
allow_methods=['GET',
|
||||||
'X-Service-Token'],
|
'PUT',
|
||||||
allow_methods=['GET',
|
'POST',
|
||||||
'PUT',
|
'DELETE',
|
||||||
'POST',
|
'PATCH']
|
||||||
'DELETE',
|
)
|
||||||
'PATCH']
|
|
||||||
)
|
|
||||||
|
|
Loading…
Reference in New Issue