summaryrefslogtreecommitdiffstats
path: root/nova/api/openstack/auth.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/api/openstack/auth.py')
-rw-r--r--nova/api/openstack/auth.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/api/openstack/auth.py b/nova/api/openstack/auth.py
index f3a9bdeca..5aa5e099b 100644
--- a/nova/api/openstack/auth.py
+++ b/nova/api/openstack/auth.py
@@ -69,6 +69,8 @@ class AuthMiddleware(wsgi.Middleware):
return faults.Fault(webob.exc.HTTPUnauthorized())
req.environ['nova.context'] = context.RequestContext(user, account)
+ version = req.path.split('/')[1].replace('v', '')
+ req.environ['api.version'] = version
return self.application
def has_authentication(self, req):