Skip to content

Commit 2eb1d51

Browse files
committed
sslmode param support was added
brianc/node-postgres#2345
1 parent b241927 commit 2eb1d51

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/postgres.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
import {json} from "micro";
22
import {Pool} from "pg";
3-
import {parse} from "url";
43
import QueryStream from "pg-query-stream";
54
import JSONStream from "JSONStream";
65

76
export default url => {
8-
const {
9-
query: {sslmode}
10-
} = parse(url, true);
11-
const pool = new Pool({connectionString: url, ssl: !!sslmode});
7+
const pool = new Pool({connectionString: url});
128

139
return async function query(req, res) {
1410
const {sql, params} = await json(req);

0 commit comments

Comments
 (0)