From d4cf260aed7bef42bd7885360a32ea5547e8994c Mon Sep 17 00:00:00 2001 From: cielhaidir <116857323+cielhaidir@users.noreply.github.com> Date: Mon, 27 Jul 2026 19:13:25 +0800 Subject: [PATCH] fix(api): support HTTPS job posting fetches (#3267) --- .../api/src/features/applications/ai.test.ts | 21 +++++++++++++++++++ packages/api/src/features/applications/ai.ts | 9 +++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/packages/api/src/features/applications/ai.test.ts b/packages/api/src/features/applications/ai.test.ts index 2eee5628d..9b294217a 100644 --- a/packages/api/src/features/applications/ai.test.ts +++ b/packages/api/src/features/applications/ai.test.ts @@ -104,6 +104,27 @@ describe("fetchJobPostingText", () => { await expect(fetchJobPostingText("https://jobs.example/posting")).resolves.toBe("Senior Engineer"); expect(pinnedAddress).toBe("93.184.216.34"); }); + + it("supports Node lookup calls with all=true", async () => { + lookupMock.mockResolvedValue([{ address: "93.184.216.34", family: 4 }]); + let lookupResult: unknown; + requestMock.mockImplementation((_url, options, callback) => { + options.lookup("jobs.example", { all: true }, (_error: Error | null, result: unknown) => { + lookupResult = result; + }); + const response = Readable.from([Buffer.from("
Senior Engineer")]) as Readable & { + statusCode: number; + headers: Record