← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1823703] Re: Wrong version URL when Glance is deployed behind proxy with vhost

 

Reviewed:  https://review.opendev.org/650879
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=33626369e591b03eb75c44b5c45c7969c7cb40e9
Submitter: Zuul
Branch:    master

commit 33626369e591b03eb75c44b5c45c7969c7cb40e9
Author: Vlad Gusev <vlad.esten@xxxxxxxxx>
Date:   Mon Apr 8 15:49:16 2019 +0300

    Use application_url in API version document
    
    This handles the possible vhost in Glance API path correctly
    (like https://cloud.example.com/image) contrary to host_url.
    
    Change-Id: If86d805ddc46944e3aa2785aa5d775fe15b8468c
    Closes-Bug: #1823703


** Changed in: glance
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1823703

Title:
  Wrong version URL when Glance is deployed behind proxy with vhost

Status in Glance:
  Fix Released

Bug description:
  When Glance is deployed behind SSL terminating proxy, for example, as
  https://cloud.example.com/image the href returned in version doc is
  missing the vhost - https://cloud.example.com/v2

  How to reproduce:
  1. Run Glance behind proxy with vhost as https://cloud.example.com/image and pass host, X-Forwarded-For, X-Forwarded-Proto, X-Forwarded-Prefix headers
  2. Remove DEFAULT/public_endpoint option from the config
  3. Enable HTTPProxyToWSGI: oslo_middleware/enable_proxy_headers_parsing=True
  4. curl https://cloud.example.com/image

  Actual result:
  https://cloud.example.com/v2/ in all hrefs

  Expected result:
  https://cloud.example.com/image/v2/ in all hrefs

  Glance version: Queens

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1823703/+subscriptions


References