summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorwikiapiserver2026-06-25 22:00:25 +0200
committerwikiapiserver2026-06-25 22:00:25 +0200
commit4907cfb72ef69fb94c49cfb484a5a2907db0dee8 (patch)
tree9542d121d87cd2bb0074de0597069c9c49bdd372 /main.go
parenta67cf297df78521d1c2dee0dc2746a8046675b56 (diff)
downloadwikiapiserver-4907cfb72ef69fb94c49cfb484a5a2907db0dee8.tar.gz
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
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
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,
}