Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Handle zstd encoding in webpack proxy config #30034

Merged
merged 3 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 122 additions & 0 deletions superset-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions superset-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@
"react-resizable": "^3.0.5",
"react-test-renderer": "^16.14.0",
"redux-mock-store": "^1.5.4",
"simple-zstd": "^1.4.2",
"sinon": "^18.0.0",
"source-map": "^0.7.4",
"source-map-support": "^0.5.21",
Expand Down
3 changes: 3 additions & 0 deletions superset-frontend/webpack.proxy-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/
const zlib = require('zlib');
const { ZSTDDecompress } = require('simple-zstd');

Check failure on line 20 in superset-frontend/webpack.proxy-config.js

View workflow job for this annotation

GitHub Actions / frontend-build

'simple-zstd' should be listed in the project's dependencies, not devDependencies

const yargs = require('yargs');
// eslint-disable-next-line import/no-extraneous-dependencies
Expand Down Expand Up @@ -127,6 +128,8 @@
uncompress = zlib.createBrotliDecompress();
} else if (responseEncoding === 'deflate') {
uncompress = zlib.createInflate();
} else if (responseEncoding === 'zstd') {
uncompress = ZSTDDecompress();
}
if (uncompress) {
originalResponse.pipe(uncompress);
Expand Down
Loading