louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
56.52k stars 5.08k forks source link

Enable HTTP compression for uptime check HTTP requests. #5137

Open flyicn opened 22 hours ago

flyicn commented 22 hours ago

📑 I have found these related issues/pull requests

can't find any related issue.

🏷️ Feature Request Type

Settings

🔖 Feature description

currently, uptimekuma sends http request without "accept-encoding" header.

which means, response is received without compression, in plain text, which can waste bandwidth.

image

✔️ Solution

Add the "Accept-Encoding: gzip" header to HTTP request headers globally by default, and provide an option to disable it. It would be great to support other compression methods besides gzip(br, zstd)

https://caniuse.com/zstd https://caniuse.com/?search=brotli

❓ Alternatives

The current workaround is to manually add an HTTP request header for every single monitor, as shown below.

Decompression is done automatically for gzip without modifying uptimekuma (but not for br or zstd).

image image

📝 Additional Context

No response

CommanderStorm commented 7 hours ago

zstd and brotli might not be avaliable in the version of node (node 16) that we have currently online in v1.23.x..

Bumping node is a major version bump and thus has to wait for #4500