Skip to content

Commit 552b368

Browse files
Allow certificates with unknown root on localhost only
1 parent 5643f8c commit 552b368

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/drivers/connection-tls.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class SQLiteCloudTlsConnection extends SQLiteCloudConnection {
5050
const connectionOptions = {
5151
host: config.host,
5252
port: config.port as number,
53-
rejectUnauthorized: true,
53+
rejectUnauthorized: config.host != 'localhost',
5454
// Server name for the SNI (Server Name Indication) TLS extension.
5555
// https://r2.nodejs.org/docs/v6.11.4/api/tls.html#tls_class_tls_tlssocket
5656
servername: config.host

0 commit comments

Comments
 (0)