fix: query needs to be manually built and re-encoded
This commit is contained in:
parent
07c36109d8
commit
75e7ba00cd
|
@ -122,7 +122,10 @@ func (w *tusJwtResponseWriter) WriteHeader(statusCode int) {
|
||||||
if authToken != "" && location != "" {
|
if authToken != "" && location != "" {
|
||||||
|
|
||||||
parsedUrl, _ := url.Parse(location)
|
parsedUrl, _ := url.Parse(location)
|
||||||
parsedUrl.Query().Set("auth_token", authToken)
|
|
||||||
|
query := parsedUrl.Query()
|
||||||
|
query.Set("auth_token", authToken)
|
||||||
|
parsedUrl.RawQuery = query.Encode()
|
||||||
|
|
||||||
w.Header().Set("Location", parsedUrl.String())
|
w.Header().Set("Location", parsedUrl.String())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue