diff options
| author | wikiapiserver | 2026-06-25 22:00:25 +0200 |
|---|---|---|
| committer | wikiapiserver | 2026-06-25 22:00:25 +0200 |
| commit | 4907cfb72ef69fb94c49cfb484a5a2907db0dee8 (patch) | |
| tree | 9542d121d87cd2bb0074de0597069c9c49bdd372 /main.go | |
| parent | a67cf297df78521d1c2dee0dc2746a8046675b56 (diff) | |
| download | wikiapiserver-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.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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, } |
