fix(router/request): add query string when redirecting back to referrer (#37)

* Add query string when redirecting back to referrer

Fixes #36

* Manipulate URL object for more consistent stringify

Co-authored-by: thokra-nav <85170275+thokra-nav@users.noreply.github.com>

Co-authored-by: thokra-nav <85170275+thokra-nav@users.noreply.github.com>
This commit is contained in:
André Roaldseth
2022-07-04 13:25:41 +02:00
committed by GitHub
parent 22a4ca4c1a
commit 1f830b5dc8

View File

@@ -103,7 +103,9 @@ func refererPath(r *http.Request) string {
return ""
}
return referer.Path
referer.Scheme = ""
referer.Host = ""
return referer.String()
}
// RetryURI returns a URI that should retry the desired route that failed.