Skip to content

Commit

Permalink
Merge branch 'patch-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
gadelkareem committed Apr 25, 2018
2 parents e3c3d37 + 4b784b1 commit 6c3d648
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions stm/location.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,10 @@ func (loc *Location) PathInPublic() string {
func (loc *Location) URL() string {
base, _ := url.Parse(loc.opts.SitemapsHost())

var u *url.URL
for _, ref := range []string{
loc.opts.sitemapsPath, loc.Filename(),
loc.opts.sitemapsPath + "/", loc.Filename(),
} {
u, _ = url.Parse(ref)
base = base.ResolveReference(u)
base, _ = base.Parse(ref)
}

return base.String()
Expand Down

0 comments on commit 6c3d648

Please sign in to comment.