From bd6e473e1d4b8672eba5c206760250891ab1925c Mon Sep 17 00:00:00 2001 From: Joe Mancuso Date: Wed, 30 Oct 2024 13:00:12 -0400 Subject: [PATCH] Refactor PostgresConnection to support SSL options --- src/masoniteorm/connections/PostgresConnection.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/masoniteorm/connections/PostgresConnection.py b/src/masoniteorm/connections/PostgresConnection.py index 0bbfe172..2823c299 100644 --- a/src/masoniteorm/connections/PostgresConnection.py +++ b/src/masoniteorm/connections/PostgresConnection.py @@ -85,6 +85,10 @@ def create_connection(self): password=self.password, host=self.host, port=self.port, + sslmode=self.options.get("sslmode"), + sslcert=self.options.get("sslcert"), + sslkey=self.options.get("sslkey"), + sslrootcert=self.options.get("sslrootcert"), options=( f"-c search_path={self.schema or self.full_details.get('schema')}" if self.schema or self.full_details.get("schema") @@ -106,6 +110,10 @@ def create_connection(self): password=self.password, host=self.host, port=self.port, + sslmode=self.options.get("sslmode"), + sslcert=self.options.get("sslcert"), + sslkey=self.options.get("sslkey"), + sslrootcert=self.options.get("sslrootcert"), options=( f"-c search_path={self.schema or self.full_details.get('schema')}" if self.schema or self.full_details.get("schema")