refactor: make GZipMiddleware excluded content types configurable

Closed
SH
3mo ago
+86-12

Summary

This PR refactors the GZipMiddleware to make excluded content types configurable via a constructor parameter instead of using a hardcoded constant.

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.