From 4907cfb72ef69fb94c49cfb484a5a2907db0dee8 Mon Sep 17 00:00:00 2001 From: wikiapiserver Date: Thu, 25 Jun 2026 22:00:25 +0200 Subject: fix: pass through upstream HTTP status codes from /article - Non-2xx responses (404, 429, 5xx) are now forwarded to the client with their original status code and response body - Increased WriteTimeout to 45s to accommodate slow upstream API - Added explicit resp.Body.Close() and response flush before return --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 341a175..1633e96 100644 --- a/main.go +++ b/main.go @@ -94,7 +94,7 @@ func main() { Addr: addr, Handler: mux, ReadTimeout: 5 * time.Second, - WriteTimeout: 10 * time.Second, + WriteTimeout: 45 * time.Second, IdleTimeout: 120 * time.Second, } -- cgit v1.2.3