Browse Source

Use calculated config members.

multi-app-trie
Benjamin Shelton 5 months ago
parent
commit
71f0833322
1 changed files with 2 additions and 6 deletions
  1. +2
    -6
      urls.go

+ 2
- 6
urls.go View File

@ -117,7 +117,7 @@ func (b *URLBuilder) Encode() string {
}
u := url.URL{
Host: b.mapper.Config.FullHost,
Host: b.mapper.Config.CalculatedHostname(),
}
if !b.External {
@ -126,11 +126,7 @@ func (b *URLBuilder) Encode() string {
} else {
// Override scheme only if we're forcing external links.
if b.Scheme == "" {
if b.mapper.Config.Protocol != "" {
u.Scheme = b.mapper.Config.Protocol
} else {
u.Scheme = "http"
}
u.Scheme = b.mapper.Config.CalculatedProtocol()
} else {
u.Scheme = b.Scheme
}


Loading…
Cancel
Save