Add trust proxy to the internal api

Fix access logs not having the right ip
This commit is contained in:
Owen
2026-02-24 20:23:42 -08:00
parent 63e208f4ec
commit 49a326cde7

View File

@@ -16,6 +16,11 @@ const internalPort = config.getRawConfig().server.internal_port;
export function createInternalServer() {
const internalServer = express();
const trustProxy = config.getRawConfig().server.trust_proxy;
if (trustProxy) {
internalServer.set("trust proxy", trustProxy);
}
internalServer.use(helmet());
internalServer.use(cors());
internalServer.use(stripDuplicateSesions);