We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ff1822 commit 87989e1Copy full SHA for 87989e1
main.go
@@ -416,6 +416,7 @@ func (s *ProxyServer) handleRequest(w http.ResponseWriter, r *http.Request) {
416
//outReq.Header.Set("Content-Type", "application/json")
417
418
resp, err := client.Client.Do(outReq)
419
+ //resp, err := client.Client.Do(outReq.WithContext(r.Context()))
420
if err != nil {
421
log.Printf("Request to %s failed: %v", targetURL.String(), err)
422
http.Error(w, "Failed to forward request", http.StatusBadGateway)
@@ -459,6 +460,8 @@ func main() {
459
460
srv := &http.Server{
461
Addr: ":3000",
462
Handler: nil,
463
+ ReadTimeout: 60 * time.Second, // Increase read timeout
464
+ WriteTimeout: 60 * time.Second, // Increase write timeout
465
}
466
467
go func() {
0 commit comments