From ec8829983bcdbf6a801de079d61096795c4d11a7 Mon Sep 17 00:00:00 2001 From: Joe Mancuso Date: Fri, 18 Oct 2024 13:18:11 -0400 Subject: [PATCH] Added SSL configuration in PostgresConnection --- src/masoniteorm/connections/PostgresConnection.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/masoniteorm/connections/PostgresConnection.py b/src/masoniteorm/connections/PostgresConnection.py index 19919d95..9d4c74ad 100644 --- a/src/masoniteorm/connections/PostgresConnection.py +++ b/src/masoniteorm/connections/PostgresConnection.py @@ -64,7 +64,11 @@ def make_connection(self): password=self.password, host=self.host, port=self.port, - options=f"-c search_path={schema}" if schema else "", + options=f"-c search_path={schema}" if schema else None, + sslmode=self.options.get("sslmode", "prefer"), + sslcert=self.options.get("sslcert"), + sslkey=self.options.get("sslkey"), + sslrootcert=self.options.get("sslrootcert"), ) self._connection.autocommit = True