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
This commit is contained in:
parent
75785a69cb
commit
4e96378f33
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user