mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-09 19:52:30 +02:00
Add write response timeout
This commit is contained in:
@@ -95,6 +95,8 @@ func (r *Router) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
|
||||
req, timeoutCancel := startRequestTimer(req)
|
||||
defer timeoutCancel()
|
||||
|
||||
rw = newTimeoutResponse(rw)
|
||||
|
||||
reqID := req.Header.Get(xRequestIDHeader)
|
||||
|
||||
if len(reqID) == 0 || !requestIDRe.MatchString(reqID) {
|
||||
|
Reference in New Issue
Block a user