user no stays in cache forever, fix some hubs bugs and add new enpoints
This commit is contained in:
@@ -41,6 +41,8 @@ func validCheckWithResponseOnFail(response http.ResponseWriter, request *http.Re
|
||||
maxSize = int64(config.MaxRequestBytes)
|
||||
}
|
||||
|
||||
request.Body = http.MaxBytesReader(response, request.Body, maxSize)
|
||||
|
||||
if request.ContentLength > maxSize {
|
||||
io.Copy(io.Discard, request.Body)
|
||||
http.Error(response, "Request too large", http.StatusRequestEntityTooLarge)
|
||||
|
||||
Reference in New Issue
Block a user