From c9e1b536c7f5006267324dfb6b8f6083c6d04df5 Mon Sep 17 00:00:00 2001 From: Petr Pavlik Date: Sat, 30 Dec 2023 13:47:50 +0100 Subject: [PATCH] Update configure.swift --- Sources/App/configure.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/App/configure.swift b/Sources/App/configure.swift index 7547fa4..568a96d 100644 --- a/Sources/App/configure.swift +++ b/Sources/App/configure.swift @@ -65,7 +65,8 @@ public func configure(_ app: Application) async throws { app.middleware.use(cors, at: .beginning) var tlsConfig: TLSConfiguration = .makeClientConfiguration() - tlsConfig.certificateVerification = .noHostnameVerification // Use `.noHostnameVerification` if your production env will be using something like nginx. Otherwise change it to `.fullVerification`. Command click to check the full details. + // Check if you can increase the security by performing a certificate verification based on your database setup + tlsConfig.certificateVerification = .none let nioSSLContext = try NIOSSLContext(configuration: tlsConfig) let config = SQLPostgresConfiguration(