1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

force flush only when watch param exists

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2021-02-25 15:21:31 +02:00
parent 88937ecc8e
commit 490bd045f9

View File

@ -127,8 +127,10 @@ export class LensProxy {
this.retryCounters.delete(retryCounterId);
}
if (!res.headersSent) {
res.flushHeaders();
if (!res.headersSent && req.url) {
const url = new URL(req.url, "http://localhost");
if (url.searchParams.has("watch")) res.flushHeaders();
}
});