Skip to content

Commit 4eb0b7d

Browse files
fix: prevent Slowloris attack
1 parent cd2bb7b commit 4eb0b7d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/auth/callback_server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func StartCallbackServer() (redirectURI string, result <-chan CallbackResult, er
8585
ch := make(chan CallbackResult, 1)
8686

8787
mux := http.NewServeMux()
88-
srv := &http.Server{Handler: mux}
88+
srv := &http.Server{Handler: mux, ReadHeaderTimeout: 10 * time.Second}
8989

9090
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
9191
q := r.URL.Query()

0 commit comments

Comments
 (0)