mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-17 15:53:59 -06:00
[PR #14307] [CLOSED] perf: Add GZip, Brotli, ZStd compression middleware that respects User Accept-Encoding header
#127094
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/14307
Author: @jtbaker
Created: 5/25/2025
Status: ❌ Closed
Base:
dev← Head:add-compression📝 Commits (5)
2ca220badd starlette compress dependencyc53a312add compression middleware to initialization pipeline5f0a750lock modification after uv sync0097cc7whitespacef1ab0dealphabetical📊 Changes
3 files changed (+682 additions, -882 deletions)
View changed files
📝
backend/open_webui/main.py(+2 -0)📝
pyproject.toml(+1 -29)📝
uv.lock(+679 -853)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Description
This PR adds a Starelette based Compression middleware (https://github.com/Zaczero/starlette-compress) that compresses responses based on the user's
Accept-Encodingheaders from their browser, with the goal of greatly reducing the bandwidth and time needed to transfer both static assets, as well as JSON responses to AJAX requests (models, configurations, message history, etc.). In my testing, it reduces the bandwidth of most compressible HTTP responses greatly - seeing 1/3 the amount of data sent over the wire, with the largest asset I saw, the font TTF file being reduces from ~650Kb to ~250Kb when sent using ZStd.Added
Accept-Encodingheaders).Changed
Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.