Skip to content

Commit a3eeecb

Browse files
authored
docs: Remove redundant Buffer → string conversions in TLS configuration
1 parent 0b64e4d commit a3eeecb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/pages/features/ssl.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ const config = {
1515
host: 'host-or-ip',
1616
// this object will be passed to the TLSSocket constructor
1717
ssl: {
18-
ca: fs.readFileSync('/path/to/server-certificates/root.crt').toString(),
19-
key: fs.readFileSync('/path/to/client-key/postgresql.key').toString(),
20-
cert: fs.readFileSync('/path/to/client-certificates/postgresql.crt').toString(),
18+
ca: fs.readFileSync('/path/to/server-certificates/root.crt'),
19+
key: fs.readFileSync('/path/to/client-key/postgresql.key'),
20+
cert: fs.readFileSync('/path/to/client-certificates/postgresql.crt'),
2121
},
2222
}
2323

@@ -44,7 +44,7 @@ const config = {
4444
connectionString: 'postgres://user:password@host:port/db?sslmode=require',
4545
// Beware! The ssl object is overwritten when parsing the connectionString
4646
ssl: {
47-
ca: fs.readFileSync('/path/to/server-certificates/root.crt').toString(),
47+
ca: fs.readFileSync('/path/to/server-certificates/root.crt'),
4848
},
4949
}
5050
```

0 commit comments

Comments
 (0)