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.
Closes-Bug:
@@ -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:
