From 4e96378f334da2a3f0d4c746de89a4865122c8d9 Mon Sep 17 00:00:00 2001 From: Michael Krotscheck Date: Mon, 19 Oct 2015 08:49:50 -0700 Subject: [PATCH] Switched CORS configuration to use oslo_config When cors middleware was moved into paste.ini, genconfig was not updated to indicate that the configuration method had changed. This breaks backwards-compatibility, however since the middleware supports automatic oslo config detection via pastedeploy, it is easily corrected. This patch updates the api-paste.ini file to encourage CORS middleware to draw its configuration from sahara.conf. It also moves cors to the beginning of the middleware pipeline. Change-Id: I4cff577aeff21286d0f9ce13142babec39db5e13 --- etc/sahara/api-paste.ini | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/etc/sahara/api-paste.ini b/etc/sahara/api-paste.ini index 440c4f3af1..269487b2c1 100644 --- a/etc/sahara/api-paste.ini +++ b/etc/sahara/api-paste.ini @@ -1,5 +1,5 @@ [pipeline:sahara] -pipeline = request_id cors acl auth_validator sahara_api +pipeline = cors request_id acl auth_validator sahara_api [composite:sahara_api] use = egg:Paste#urlmap @@ -10,10 +10,7 @@ paste.app_factory = sahara.api.middleware.sahara_middleware:Router.factory [filter:cors] paste.filter_factory = oslo_middleware.cors:filter_factory -allow_headers=X-Auth-Token,X-Server-Management-Url -allow_methods=GET,PUT,POST,DELETE,PATCH -allowed_origin= -expose_headers=X-Auth-Token,X-Server-Management-Url +oslo_config_project = sahara [filter:request_id] paste.filter_factory = oslo_middleware.request_id:RequestId.factory