fix upload
This commit is contained in:
@@ -42,11 +42,13 @@ func main() {
|
||||
srv.RegisterRoutes(mux)
|
||||
|
||||
// Create HTTP server with timeouts for security and reliability
|
||||
// Note: ReadTimeout is set high to allow streaming uploads where data
|
||||
// may come in bursts (zfs send can pause between chunks)
|
||||
httpServer := &http.Server{
|
||||
Addr: ":" + cfg.Port,
|
||||
Handler: mux,
|
||||
ReadTimeout: 30 * time.Second, // Prevent slowloris attacks
|
||||
WriteTimeout: 30 * time.Minute, // Allow large file uploads
|
||||
ReadTimeout: 30 * time.Minute, // Allow streaming uploads with pauses
|
||||
WriteTimeout: 30 * time.Minute, // Allow large file downloads
|
||||
IdleTimeout: 120 * time.Second, // Close idle connections
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user