spegling av
https://github.com/karl0ss/homepage.git
synced 2025-11-07 17:50:56 +00:00
förälder
1439b6cc9c
incheckning
5640798fe4
@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable prefer-promise-reject-errors */
|
/* eslint-disable prefer-promise-reject-errors */
|
||||||
/* eslint-disable no-param-reassign */
|
/* eslint-disable no-param-reassign */
|
||||||
import { createUnzip } from "node:zlib";
|
import { createUnzip, constants as zlibConstants } from "node:zlib";
|
||||||
|
|
||||||
import { http, https } from "follow-redirects";
|
import { http, https } from "follow-redirects";
|
||||||
|
|
||||||
@ -34,7 +34,11 @@ function handleRequest(requestor, url, params) {
|
|||||||
|
|
||||||
let responseContent = response;
|
let responseContent = response;
|
||||||
if (contentEncoding === 'gzip' || contentEncoding === 'deflate') {
|
if (contentEncoding === 'gzip' || contentEncoding === 'deflate') {
|
||||||
responseContent = createUnzip();
|
responseContent = createUnzip({
|
||||||
|
flush: zlibConstants.Z_SYNC_FLUSH,
|
||||||
|
finishFlush: zlibConstants.Z_SYNC_FLUSH
|
||||||
|
});
|
||||||
|
|
||||||
// zlib errors
|
// zlib errors
|
||||||
responseContent.on("error", (e) => {
|
responseContent.on("error", (e) => {
|
||||||
logger.error(e);
|
logger.error(e);
|
||||||
|
|||||||
Laddar…
x
Referens i nytt ärende
Block a user