Skip to content

Commit ad651a2

Browse files
fix(db-client): set insecure tls connection via .env variable
1 parent a0d333f commit ad651a2

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.env.example

+5
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,9 @@
1111

1212
# Get DSN with the command `npm run db:dsn`:
1313
# EDGEDB_DSN="edgedb://username:password@localhost:port/edgedb"
14+
15+
# Note: when developing locally you will need to set tls security to insecure,
16+
# because the development server uses self-signed certificates which will cause api calls with the fetch api to fail.
17+
EDGEDB_CLIENT_TLS_SECURITY=insecure
18+
1419
# NEXT_PUBLIC_CLIENTVAR="bar"

src/edgedb/client.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
import { createClient } from "edgedb";
22

3-
export const client = createClient({
4-
// Note: when developing locally you will need to set tls security to insecure,
5-
// because the development server uses self-signed certificates which will cause api calls with the fetch api to fail.
6-
tlsSecurity: "insecure",
7-
});
3+
export const client = createClient();

0 commit comments

Comments
 (0)