mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix: Handle zstd encoding in webpack proxy config (#30034)
This commit is contained in:
committed by
GitHub
parent
e886cc40fe
commit
75c500c9a5
@@ -17,6 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
const zlib = require('zlib');
|
||||
const { ZSTDDecompress } = require('simple-zstd');
|
||||
|
||||
const yargs = require('yargs');
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
@@ -127,6 +128,8 @@ function processHTML(proxyResponse, response) {
|
||||
uncompress = zlib.createBrotliDecompress();
|
||||
} else if (responseEncoding === 'deflate') {
|
||||
uncompress = zlib.createInflate();
|
||||
} else if (responseEncoding === 'zstd') {
|
||||
uncompress = ZSTDDecompress();
|
||||
}
|
||||
if (uncompress) {
|
||||
originalResponse.pipe(uncompress);
|
||||
|
||||
Reference in New Issue
Block a user