feat(self-host): proxy support (FIR-1111) (#1212)

* feat(self-host): proxy support

* fix(playwright-service-ts): return untreated text/plain
This commit is contained in:
Gergő Móricz
2025-02-20 14:20:03 +01:00
committed by GitHub
parent c75522f535
commit c38dcd0432
6 changed files with 48 additions and 11 deletions
+1 -1
View File
@@ -139,7 +139,7 @@ const scrapePage = async (page: Page, url: string, waitUntil: 'load' | 'networki
if (response) {
headers = await response.allHeaders();
const ct = Object.entries(headers).find(x => x[0].toLowerCase() === "content-type");
if (ct && ct[1].includes("application/json")) {
if (ct && (ct[1].includes("application/json") || ct[1].includes("text/plain"))) {
content = (await response.body()).toString("utf8"); // TODO: determine real encoding
}
}