api/security: implement api keys as method of authentication

This commit is contained in:
dumbmoron
2024-10-04 14:58:56 +00:00
parent 4317b128a8
commit 741dfd40f5
7 changed files with 273 additions and 4 deletions

View File

@@ -43,6 +43,11 @@ const env = {
&& process.env.TURNSTILE_SECRET
&& process.env.JWT_SECRET,
apiKeyURL: process.env.API_KEY_URL && new URL(process.env.API_KEY_URL),
authRequired: process.env.API_AUTH_REQUIRED === '1',
keyReloadInterval: 900,
enabledServices,
}