Enable URLs returned from the registry to be configured as relative.
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
This commit is contained in:
parent
22cab6d148
commit
3dd506d896
6 changed files with 210 additions and 91 deletions
|
@ -721,9 +721,9 @@ func (app *App) context(w http.ResponseWriter, r *http.Request) *Context {
|
|||
// A "host" item in the configuration takes precedence over
|
||||
// X-Forwarded-Proto and X-Forwarded-Host headers, and the
|
||||
// hostname in the request.
|
||||
context.urlBuilder = v2.NewURLBuilder(&app.httpHost)
|
||||
context.urlBuilder = v2.NewURLBuilder(&app.httpHost, false)
|
||||
} else {
|
||||
context.urlBuilder = v2.NewURLBuilderFromRequest(r)
|
||||
context.urlBuilder = v2.NewURLBuilderFromRequest(r, app.Config.HTTP.RelativeURLs)
|
||||
}
|
||||
|
||||
return context
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue