deb-murano/etc/murano/murano-paste.ini
Michael Krotscheck 76d617287c Added CORS support to Murano
This adds the CORS support middleware to Murano, allowing a deployer
to optionally configure rules under which a javascript client may
break the single-origin policy and access the API directly. Included
are Murano's custom headers, so that anyone activating this
middleware does not have to explicitly enable them.

The paste.ini method of deploying the middleware was
chosen, because it needs to be able to annotate responses created
by other middleware.

OpenStack CrossProject Spec:
   http://specs.openstack.org/openstack/openstack-specs/specs/cors-support.html
Oslo_Middleware Docs:
   http://docs.openstack.org/developer/oslo.middleware/cors.html
OpenStack Cloud Admin Guide:
   http://docs.openstack.org/admin-guide-cloud/cross_project_cors.html

Change-Id: If9eff9a4bcf272eebe9fd9d4e13dec64decb4997
2015-12-09 08:24:10 -08:00

51 lines
1.8 KiB
INI

[pipeline:cloudfoundry]
pipeline = cors request_id ssl ext_context authtoken context cloudfoundryapi
[pipeline:murano]
pipeline = cors request_id ssl versionnegotiation faultwrap authtoken context rootapp
[filter:context]
paste.filter_factory = murano.api.middleware.context:ContextMiddleware.factory
#For more information see Auth-Token Middleware with Username and Password
#http://docs.openstack.org/developer/keystone/configuringservices.html
[filter:authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
[composite:rootapp]
use = egg:Paste#urlmap
/: apiversions
/v1: apiv1app
[app:apiversions]
paste.app_factory = murano.api.versions:create_resource
[app:apiv1app]
paste.app_factory = murano.api.v1.router:API.factory
[app:cloudfoundryapi]
paste.app_factory = murano.api.v1.cloudfoundry.router:API.factory
[filter:versionnegotiation]
paste.filter_factory = murano.api.middleware.version_negotiation:VersionNegotiationFilter.factory
[filter:faultwrap]
paste.filter_factory = murano.api.middleware.fault:FaultWrapper.factory
# Middleware to set x-openstack-request-id in http response header
[filter:request_id]
paste.filter_factory = oslo_middleware.request_id:RequestId.factory
[filter:ssl]
paste.filter_factory = murano.api.middleware.ssl:SSLMiddleware.factory
[filter:ext_context]
paste.filter_factory = murano.api.middleware.ext_context:ExternalContextMiddleware.factory
[filter:cors]
paste.filter_factory = oslo_middleware.cors:filter_factory
oslo_config_project = murano
latent_allow_headers = X-Auth-Token, X-Openstack-Request-Id, X-Configuration-Session, X-Roles, X-User-Id, X-Tenant-Id
latent_expose_headers = X-Auth-Token, X-Openstack-Request-Id, X-Configuration-Session, X-Roles, X-User-Id, X-Tenant-Id
latent_allow_methods = GET, PUT, POST, DELETE, PATCH