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 sahara'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.

Change-Id: Ibf89e69f6e9a747043c6d79e20805f66a9c7aefa
This commit is contained in:
Michael Krotscheck 2016-01-08 10:05:42 -08:00
parent a55de6ea81
commit 030705eb04

View File

@ -11,6 +11,9 @@ paste.app_factory = sahara.api.middleware.sahara_middleware:Router.factory
[filter:cors]
paste.filter_factory = oslo_middleware.cors:filter_factory
oslo_config_project = sahara
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:request_id]
paste.filter_factory = oslo_middleware.request_id:RequestId.factory