Add AI service API token auth
All checks were successful
CI / test (push) Successful in 15s
Build and Deploy / build-and-deploy (push) Successful in 23s

This commit is contained in:
Grendgi
2026-06-08 14:16:24 +03:00
parent eb59298135
commit 038ad8d7cf
6 changed files with 89 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ type Config struct {
HTTPPort int
DatabaseURL string
MigrateOnStart bool
APIAuthToken string
LLMBaseURL string
LLMAPIKey string
@@ -30,6 +31,7 @@ func Load() Config {
HTTPPort: envInt("HTTP_PORT", 8080),
DatabaseURL: envString("DATABASE_URL", ""),
MigrateOnStart: envBool("MIGRATE_ON_START", true),
APIAuthToken: envString("AI_SERVICE_TOKEN", ""),
LLMBaseURL: envString("LLM_BASE_URL", ""),
LLMAPIKey: envString("LLM_API_KEY", ""),