Compress middleware will only compress the response if some conditions are met:
- Client sends an
accept-encodingheader with valuegzipordeflate - Response size is bigger than the threshold specified in the middleware (1024 bytes by default)
- Response content-type is "compressible" (most text types, like
text/html,text/plain,application/json, etc.