Skip to content

Commit 793ff42

Browse files
authored
Improve secure connection validation for Neo4j
Refactor secure connection check for Neo4j URL.
1 parent d6e9bc5 commit 793ff42

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

apps/web/components/Neo4jGraph.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,12 @@ export default function Neo4jGraph({
9393
const neo4j = (await import("neo4j-driver")).default;
9494

9595
// FIX: Check if the URL implies a secure connection (Cloud/Aura)
96-
const isSecure = neo4jUrl.includes('+s');
97-
96+
const isSecure =
97+
neo4jUrl.startsWith('neo4j+s://') ||
98+
neo4jUrl.startsWith('neo4j+ssc://') ||
99+
neo4jUrl.startsWith('bolt+s://') ||
100+
neo4jUrl.startsWith('bolt+ssc://');
101+
98102
const driver = neo4j.driver(
99103
neo4jUrl,
100104
neo4j.auth.basic(username, password),

0 commit comments

Comments
 (0)