Fix endpoint error when running keystone on apache
When running keystone in httpd, horizon could not generate the
right keystone endpoint url. Fixes this issue by retrieving the
whole path from the service_catalog or OPENSTACK_KEYSTONE_URL
and generating a new url.
Change-Id: Id8459947498127e47700d9f690d4ed4d5cadbba9
Closes-bug: #1295128
(cherry picked from commit 48a0d07e45
)
This commit is contained in:
parent
e53cc81fe5
commit
e32a00dc32
|
@ -113,9 +113,8 @@ def _get_endpoint_url(request, endpoint_type, catalog=None):
|
|||
|
||||
# TODO(gabriel): When the Service Catalog no longer contains API versions
|
||||
# in the endpoints this can be removed.
|
||||
bits = urlparse.urlparse(url)
|
||||
root = "://".join((bits.scheme, bits.netloc))
|
||||
url = "%s/v%s" % (root, VERSIONS.active)
|
||||
url = url.rstrip('/')
|
||||
url = urlparse.urljoin(url, 'v%s' % VERSIONS.active)
|
||||
|
||||
return url
|
||||
|
||||
|
|
Loading…
Reference in New Issue