force flush only when watch param exists

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen committed 2021-02-25 15:21:31 +02:00
1 parent 88937ecc8e
commit 490bd045f9
1 file changed
+4 -2
+4 -2
View File
@@ -127,8 +127,10 @@ export class LensProxy {
this.retryCounters.delete(retryCounterId); this.retryCounters.delete(retryCounterId);
} }
if (!res.headersSent) { if (!res.headersSent && req.url) {
res.flushHeaders(); const url = new URL(req.url, "http://localhost");
if (url.searchParams.has("watch")) res.flushHeaders();
} }
}); });