Always pass the public endpoint to the client

Even if Horizon is configured to use internal endpoints for requests
made by its server side to other OpenStack services, the client side
should not be restricted to run only in networks which have access to
the internal endpoints.

Change-Id: Ibdc663a133670e8f07530c0d7c5ed7df2d92b99b
Closes-Bug: #1639080
This commit is contained in:
Paulo Matias 2017-01-05 17:26:05 -02:00
parent dcd22840e0
commit 446e5aefb4

View File

@ -371,7 +371,7 @@ def get_image_upload_mode():
class ExternallyUploadedImage(Image):
def __init__(self, apiresource, request):
super(ExternallyUploadedImage, self).__init__(apiresource)
image_endpoint = base.url_for(request, 'image')
image_endpoint = base.url_for(request, 'image', 'publicURL')
if VERSIONS.active >= 2:
upload_template = "%s/v2/images/%s/file"
else: