From 894f3c3d148c81a757e413763b264b149f5e90d2 Mon Sep 17 00:00:00 2001 From: Nour <1257310+nourspace@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:14:40 +0000 Subject: [PATCH] feat: allow customizing auth host --- src/config/index.ts | 2 ++ src/daemon/run.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/config/index.ts b/src/config/index.ts index a638e2c..4c37c02 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -33,6 +33,7 @@ export interface IConfig { }; admin: IAdminOpts; authPort?: number; + authHost?: string; database: string; logs: string; keys: Record; @@ -49,6 +50,7 @@ const defaultConfig: IConfig = { ] }, authPort: 3000, + authHost: 'localhost', admin: { npubs: [], adminRelays: [ diff --git a/src/daemon/run.ts b/src/daemon/run.ts index ea672f1..ec5b16a 100644 --- a/src/daemon/run.ts +++ b/src/daemon/run.ts @@ -185,7 +185,7 @@ class Daemon { } }); - this.fastify.listen({ port: this.config.authPort }); + this.fastify.listen({ port: this.config.authPort, host: this.config.authHost }); this.fastify.get('/requests/:id', authorizeRequestWebHandler); this.fastify.post('/requests/:id', processRequestWebHandler);