From 248ad9eb966fcb6b46d2fa92de02e72398d901a0 Mon Sep 17 00:00:00 2001 From: Kaloyan Danchev Date: Thu, 19 Mar 2026 08:13:25 +0200 Subject: [PATCH] Fix DNS resolution for upstream API proxy Node's built-in DNS resolver (c-ares) can fail to resolve hostnames that the system resolver handles fine. Set dns.setDefaultResultOrder to use the system resolver order. Co-Authored-By: Claude Opus 4.6 --- backend/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/index.ts b/backend/src/index.ts index 73fc1de..47fba60 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -1,4 +1,7 @@ import 'dotenv/config'; +import dns from 'node:dns'; +// Use system DNS resolver instead of Node's built-in c-ares resolver +dns.setDefaultResultOrder('verbatim'); import express from 'express'; import cors from 'cors'; import { verifyJwt } from './jwt.js';