Fix bug on url building (#5)

* fix path_prefix prepend

* set query

* remove path_prefix from path

* revert query set, remove debug

* print debug

* remove debug

* cr fix

* Add newline back.

Co-authored-by: FireMaskterK <20838718+FireMasterK@users.noreply.github.com>
This commit is contained in:
Andrea Spacca 2021-11-24 18:43:19 +01:00 committed by GitHub
parent e6a0f39557
commit f8ac0ac914
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -249,7 +249,8 @@ func RelativeUrl(in string) (newurl string) {
segment_query := segment_url.Query()
segment_query.Set("host", segment_url.Hostname())
segment_url.RawQuery = segment_query.Encode()
return path_prefix + segment_url.RequestURI()
segment_url.Path = path_prefix + segment_url.Path
return segment_url.RequestURI()
}
func main() {