Skip to content

Commit

Permalink
fix: wrong baseURL if open window twice
Browse files Browse the repository at this point in the history
  • Loading branch information
5aaee9 committed Feb 22, 2024
1 parent 12d12a3 commit 066eba3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions v3/internal/assetserver/assetserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"net/http"
"net/http/httptest"
"net/url"
"path"
"strings"
"time"
)
Expand Down Expand Up @@ -160,8 +159,7 @@ func GetStartURL(userURL string) (string, error) {
return "", fmt.Errorf("Error parsing URL: " + err.Error())
}
if parsedURL.Scheme == "" {
baseURL.Path = path.Join(baseURL.Path, userURL)
startURL = baseURL.String()
startURL = baseURL.ResolveReference(&url.URL{Path: userURL}).String()
// if the original URL had a trailing slash, add it back
if strings.HasSuffix(userURL, "/") && !strings.HasSuffix(startURL, "/") {
startURL = startURL + "/"
Expand Down

0 comments on commit 066eba3

Please sign in to comment.