Skip to content

Commit 3c4147c

Browse files
committed
Add redirect for / to the GitHub repo
1 parent 758fa0e commit 3c4147c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

starquery.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ func New(ctx context.Context, opts Options) *API {
6161
closeFunc: cancel,
6262
}
6363

64+
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")
67+
})
6468
api.mux.HandleFunc("GET /{org}/{repo}/user/{username}", api.handleStarredByUser)
6569
api.mux.HandleFunc("POST /webhook", api.handleWebhook)
6670

0 commit comments

Comments
 (0)