From ce0baf07c0484d7e65b1d93cdd1ec4a1f8fcd60a Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Sun, 24 Mar 2013 12:52:46 +0100 Subject: Allow request headers access in app context. - Give extensions access to request headers in app context. - Implements: blueprint allow-access-to-headers-for-extension. Change-Id: I22bba172a8ceaba9260487666172586c45aa95d4 --- keystone/common/wsgi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'keystone/common') diff --git a/keystone/common/wsgi.py b/keystone/common/wsgi.py index a07ae117..d5368b2a 100644 --- a/keystone/common/wsgi.py +++ b/keystone/common/wsgi.py @@ -161,9 +161,10 @@ class Application(BaseApplication): del arg_dict['controller'] LOG.debug(_('arg_dict: %s'), arg_dict) - # allow middleware up the stack to provide context & params + # allow middleware up the stack to provide context, params and headers. context = req.environ.get(CONTEXT_ENV, {}) context['query_string'] = dict(req.params.iteritems()) + context['headers'] = dict(req.headers.iteritems()) context['path'] = req.environ['PATH_INFO'] params = req.environ.get(PARAMS_ENV, {}) if 'REMOTE_USER' in req.environ: -- cgit