From: Michael Krotscheck Date: Fri, 8 Jan 2016 19:14:29 +0000 (-0800) Subject: Added Keystone and RequestID headers to CORS middleware X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=6383d790fda6b072fe253d5305c35994a1f65712;p=openstack-build%2Fcinder-build.git Added Keystone and RequestID headers to CORS middleware CORS middleware's latent configuration feature, new in 3.0.0, allows adding headers that apply to all valid origins. This patch adds headers commonly used in openstack to cinder's paste pipeline, so that operators do not have to be aware of additional configuration magic to ensure that browsers can talk to the API. For more information: http://docs.openstack.org/developer/oslo.middleware/cors.html#configuration-for-pastedeploy Change-Id: I77980aad268fecd1d14cb57e6140f039c01d0eb4 --- diff --git a/etc/cinder/api-paste.ini b/etc/cinder/api-paste.ini index b0f7b367b..5f1fbd333 100644 --- a/etc/cinder/api-paste.ini +++ b/etc/cinder/api-paste.ini @@ -26,6 +26,9 @@ paste.filter_factory = oslo_middleware.request_id:RequestId.factory [filter:cors] paste.filter_factory = oslo_middleware.cors:filter_factory oslo_config_project = cinder +latent_allow_headers = X-Auth-Token, X-Identity-Status, X-Roles, X-Service-Catalog, X-User-Id, X-Tenant-Id, X-OpenStack-Request-ID +latent_expose_headers = X-Auth-Token, X-Subject-Token, X-Service-Token, X-OpenStack-Request-ID +latent_allow_methods = GET, PUT, POST, DELETE, PATCH [filter:faultwrap] paste.filter_factory = cinder.api.middleware.fault:FaultWrapper.factory