feat(auth): add api key authentication
Implement API key authentication by introducing a new auth module. Update configuration and .env.example to support API key setup, and add authorization checks in the server endpoints.
This commit is contained in:
@@ -23,4 +23,10 @@ export const config = {
|
||||
* @type {boolean}
|
||||
*/
|
||||
VERBOSE: Boolean(process.env.VERBOSE ?? true),
|
||||
/**
|
||||
* The API key for securing the server.
|
||||
* If not set, the server will be public.
|
||||
* @type {string | undefined}
|
||||
*/
|
||||
API_KEY: process.env.API_KEY,
|
||||
};
|
||||
Reference in New Issue
Block a user