Skip to content

Commit e821aa1

Browse files
committed
Support setting self signed endpoint
1 parent 71b59a6 commit e821aa1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

templates/cli/lib/commands/generic.js.twig

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,16 @@ const client = new Command("client")
8080
if (url.protocol !== "http:" && url.protocol !== "https:") {
8181
throw new Error();
8282
}
83-
83+
8484
let client = new Client().setEndpoint(endpoint);
85+
if (selfSigned || globalConfig.getSelfSigned()) {
86+
client.setSelfSigned(true);
87+
}
8588
let response = await client.call('GET', '/health/version');
86-
if(!response.version) {
89+
if (!response.version) {
8790
throw new Error();
8891
}
89-
92+
9093
globalConfig.setEndpoint(endpoint);
9194
} catch (_) {
9295
throw new Error("Invalid endpoint or your Appwrite server is not running as expected.");

0 commit comments

Comments
 (0)