Skip to content

Commit 2738766

Browse files
committed
Fix / redirect
1 parent 3c4147c commit 2738766

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

starquery.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ func New(ctx context.Context, opts Options) *API {
6262
}
6363

6464
api.mux.HandleFunc("GET /", func(w http.ResponseWriter, r *http.Request) {
65-
w.WriteHeader(http.StatusTemporaryRedirect)
66-
w.Header().Set("Location", "https://github.com/coder/starquery")
65+
http.Redirect(w, r, "https://github.com/coder/starquery", http.StatusTemporaryRedirect)
6766
})
6867
api.mux.HandleFunc("GET /{org}/{repo}/user/{username}", api.handleStarredByUser)
6968
api.mux.HandleFunc("POST /webhook", api.handleWebhook)

0 commit comments

Comments
 (0)