mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -05:00
improvement(db): enforce SSL everywhere where a DB connection is established (#1522)
* improvement(db): enforce SSL everywhere where a DB connection is established * remove extraneous comment
This commit is contained in:
@@ -150,12 +150,7 @@ export async function loadWorkflowFromNormalizedTables(
|
||||
})
|
||||
|
||||
// Sanitize any invalid custom tools in agent blocks to prevent client crashes
|
||||
const { blocks: sanitizedBlocks, warnings } = sanitizeAgentToolsInBlocks(blocksMap)
|
||||
if (warnings.length > 0) {
|
||||
logger.warn(`Sanitized workflow ${workflowId} tools with ${warnings.length} warning(s)`, {
|
||||
warnings,
|
||||
})
|
||||
}
|
||||
const { blocks: sanitizedBlocks } = sanitizeAgentToolsInBlocks(blocksMap)
|
||||
|
||||
// Convert edges to the expected format
|
||||
const edgesArray: Edge[] = edges.map((edge) => ({
|
||||
|
||||
@@ -18,6 +18,7 @@ const socketDb = drizzle(
|
||||
max: 25,
|
||||
onnotice: () => {},
|
||||
debug: false,
|
||||
ssl: 'require',
|
||||
}),
|
||||
{ schema }
|
||||
)
|
||||
|
||||
@@ -15,6 +15,7 @@ const db = drizzle(
|
||||
connect_timeout: 20,
|
||||
max: 5,
|
||||
onnotice: () => {},
|
||||
ssl: 'require',
|
||||
}),
|
||||
{ schema }
|
||||
)
|
||||
|
||||
@@ -16,6 +16,7 @@ const postgresClient = postgres(connectionString, {
|
||||
connect_timeout: 30,
|
||||
max: 80,
|
||||
onnotice: () => {},
|
||||
ssl: 'require',
|
||||
})
|
||||
|
||||
const drizzleClient = drizzle(postgresClient, { schema })
|
||||
|
||||
@@ -123,6 +123,7 @@ const postgresClient = postgres(CONNECTION_STRING, {
|
||||
connect_timeout: 30,
|
||||
max: 10,
|
||||
onnotice: () => {},
|
||||
ssl: 'require',
|
||||
})
|
||||
const db = drizzle(postgresClient)
|
||||
|
||||
|
||||
@@ -147,6 +147,7 @@ const postgresClient = postgres(CONNECTION_STRING, {
|
||||
connect_timeout: 30,
|
||||
max: 10,
|
||||
onnotice: () => {},
|
||||
ssl: 'require',
|
||||
})
|
||||
const db = drizzle(postgresClient)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user