mirror of
https://github.com/aljazceru/nsecbunkerd.git
synced 2025-12-18 06:34:28 +01:00
feat: allow customizing auth host
This commit is contained in:
@@ -33,6 +33,7 @@ export interface IConfig {
|
|||||||
};
|
};
|
||||||
admin: IAdminOpts;
|
admin: IAdminOpts;
|
||||||
authPort?: number;
|
authPort?: number;
|
||||||
|
authHost?: string;
|
||||||
database: string;
|
database: string;
|
||||||
logs: string;
|
logs: string;
|
||||||
keys: Record<string, any>;
|
keys: Record<string, any>;
|
||||||
@@ -49,6 +50,7 @@ const defaultConfig: IConfig = {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
authPort: 3000,
|
authPort: 3000,
|
||||||
|
authHost: 'localhost',
|
||||||
admin: {
|
admin: {
|
||||||
npubs: [],
|
npubs: [],
|
||||||
adminRelays: [
|
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.get('/requests/:id', authorizeRequestWebHandler);
|
||||||
this.fastify.post('/requests/:id', processRequestWebHandler);
|
this.fastify.post('/requests/:id', processRequestWebHandler);
|
||||||
|
|||||||
Reference in New Issue
Block a user