Remove query string when redirecting user.
authorFlorian Forster <ff@octo.it>
Wed, 10 Jan 2018 13:52:15 +0000 (14:52 +0100)
committerFlorian Forster <ff@octo.it>
Wed, 10 Jan 2018 13:52:15 +0000 (14:52 +0100)
gfitsync.go

index 21f764b..7d90df6 100644 (file)
@@ -154,6 +154,8 @@ func fitbitGrantHandler(ctx context.Context, w http.ResponseWriter, r *http.Requ
 
        redirectURL := r.URL
        redirectURL.Path = "/"
+       redirectURL.RawQuery = ""
+       redirectURL.Fragment = ""
        http.Redirect(w, r, redirectURL.String(), http.StatusTemporaryRedirect)
        return nil
 }