Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return correct href if bind_host is 0.0.0.0.
The existing code returns incorrect href= in the root document (aka "version" document) if the default configuration is used. If a remote system accesses Glance API, the netspec of href= contains 0.0.0.0, which cannot be used for further remote accesses. This happens because attempts to use local configuration or the bind address to reconstruct URLs are futile. The correct way resolve this problem is to use the Host: header of the HTTP request. As a bonus, it works with IPv6, should we ever support it. Change-Id: I661351b679c695bd6ab310104a3246dd3069f9c6 Bug: 915621
- Loading branch information
Showing
3 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters