feat: allow customizing auth host

This commit is contained in:
Nour
2024-01-26 15:14:40 +00:00
parent 33fb9703f7
commit 894f3c3d14
2 changed files with 3 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ export interface IConfig {
};
admin: IAdminOpts;
authPort?: number;
authHost?: string;
database: string;
logs: string;
keys: Record<string, any>;
@@ -49,6 +50,7 @@ const defaultConfig: IConfig = {
]
},
authPort: 3000,
authHost: 'localhost',
admin: {
npubs: [],
adminRelays: [

View File

@@ -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);