cors: update default configuration
Set_defaults has been added into oslo_middleware. So we use it to override the configuration defaults. Co-Authored-By: zhurong <aaronzhu1121@gmail.com> Change-Id: I5d624ac46f17c5628d30c983efe1417e7dc5ca6a
This commit is contained in:
parent
3a36106707
commit
3da434357b
@ -53,24 +53,22 @@ def parse_args(args=None, usage=None, default_config_files=None):
|
||||
|
||||
def set_middleware_defaults():
|
||||
"""Update default configuration options for oslo.middleware."""
|
||||
# CORS Defaults
|
||||
# TODO(krotscheck): Update with https://review.openstack.org/#/c/285368/
|
||||
cfg.set_defaults(cors.CORS_OPTS,
|
||||
allow_headers=['X-Auth-Token',
|
||||
'X-Openstack-Request-Id',
|
||||
'X-Configuration-Session',
|
||||
'X-Roles',
|
||||
'X-User-Id',
|
||||
'X-Tenant-Id'],
|
||||
expose_headers=['X-Auth-Token',
|
||||
'X-Openstack-Request-Id',
|
||||
'X-Configuration-Session',
|
||||
'X-Roles',
|
||||
'X-User-Id',
|
||||
'X-Tenant-Id'],
|
||||
allow_methods=['GET',
|
||||
'PUT',
|
||||
'POST',
|
||||
'DELETE',
|
||||
'PATCH']
|
||||
)
|
||||
cors.set_defaults(
|
||||
allow_headers=['X-Auth-Token',
|
||||
'X-Openstack-Request-Id',
|
||||
'X-Configuration-Session',
|
||||
'X-Roles',
|
||||
'X-User-Id',
|
||||
'X-Tenant-Id'],
|
||||
expose_headers=['X-Auth-Token',
|
||||
'X-Openstack-Request-Id',
|
||||
'X-Configuration-Session',
|
||||
'X-Roles',
|
||||
'X-User-Id',
|
||||
'X-Tenant-Id'],
|
||||
allow_methods=['GET',
|
||||
'PUT',
|
||||
'POST',
|
||||
'DELETE',
|
||||
'PATCH']
|
||||
)
|
||||
|
@ -351,24 +351,23 @@ def parse_args(args=None, usage=None, default_config_files=None):
|
||||
|
||||
def set_middleware_defaults():
|
||||
"""Update default configuration options for oslo.middleware."""
|
||||
# CORS Defaults
|
||||
# TODO(krotscheck): Update with https://review.openstack.org/#/c/285368/
|
||||
cfg.set_defaults(cors.CORS_OPTS,
|
||||
allow_headers=['X-Auth-Token',
|
||||
'X-Openstack-Request-Id',
|
||||
'X-Configuration-Session',
|
||||
'X-Roles',
|
||||
'X-User-Id',
|
||||
'X-Tenant-Id'],
|
||||
expose_headers=['X-Auth-Token',
|
||||
'X-Openstack-Request-Id',
|
||||
'X-Configuration-Session',
|
||||
'X-Roles',
|
||||
'X-User-Id',
|
||||
'X-Tenant-Id'],
|
||||
allow_methods=['GET',
|
||||
'PUT',
|
||||
'POST',
|
||||
'DELETE',
|
||||
'PATCH']
|
||||
)
|
||||
|
||||
cors.set_defaults(
|
||||
allow_headers=['X-Auth-Token',
|
||||
'X-Openstack-Request-Id',
|
||||
'X-Configuration-Session',
|
||||
'X-Roles',
|
||||
'X-User-Id',
|
||||
'X-Tenant-Id'],
|
||||
expose_headers=['X-Auth-Token',
|
||||
'X-Openstack-Request-Id',
|
||||
'X-Configuration-Session',
|
||||
'X-Roles',
|
||||
'X-User-Id',
|
||||
'X-Tenant-Id'],
|
||||
allow_methods=['GET',
|
||||
'PUT',
|
||||
'POST',
|
||||
'DELETE',
|
||||
'PATCH']
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user