mirror of
https://github.com/aljazceru/nsecbunkerd.git
synced 2025-12-17 06:04:22 +01:00
feat: allow customizing auth host
This commit is contained in:
@@ -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: [
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user