From 5574a308565f5967472fc8810c2419630073dd72 Mon Sep 17 00:00:00 2001 From: yangdx Date: Thu, 24 Jul 2025 12:45:13 +0800 Subject: [PATCH] fix(postgres): handle ssl_mode="allow" in _create_ssl_context Add "allow" to the list of recognized SSL modes in PostgreSQL connection helper. Previously, ssl_mode="allow" would fall through to "Unknown SSL mode" warning. Now it's properly handled alongside "require" and "prefer" modes. --- lightrag/kg/postgres_impl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightrag/kg/postgres_impl.py b/lightrag/kg/postgres_impl.py index 9ac0f96f..0e49a67f 100644 --- a/lightrag/kg/postgres_impl.py +++ b/lightrag/kg/postgres_impl.py @@ -80,7 +80,7 @@ class PostgreSQLDB: if ssl_mode in ["disable", "allow", "prefer", "require"]: if ssl_mode == "disable": return None - elif ssl_mode in ["require", "prefer"]: + elif ssl_mode in ["require", "prefer", "allow"]: # Return None for simple SSL requirement, handled in initdb return None