We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d3c888 commit fa64344Copy full SHA for fa64344
pkg/cmd/mcp/sse.go
@@ -184,7 +184,11 @@ func runSseServer(configOpts *ServerOptions) error {
184
mux.Handle(msgPath, authMiddleware(sseServer.MessageHandler()))
185
186
// Start custom HTTP server
187
- httpServer = &http.Server{Addr: configOpts.HTTPAddr, Handler: mux}
+ httpServer = &http.Server{
188
+ Addr: configOpts.HTTPAddr,
189
+ Handler: mux,
190
+ ReadHeaderTimeout: 10 * time.Second, // Prevent Slowloris attacks
191
+ }
192
go func() {
193
if err := httpServer.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) {
194
errCh <- err
0 commit comments