require_auth and NxtgaugeTicketProvider::create_ticket both called env::var(...).expect(...) on every request, crashing instead of returning a proper error when JWT_SECRET/AI_SERVICE_KEY were unset. Both are now loaded once into AppConfig at startup and checked with a graceful 401/500 response.
19 lines
603 B
Text
19 lines
603 B
Text
APP_HOST=0.0.0.0
|
|
APP_PORT=8080
|
|
RUST_LOG=info
|
|
|
|
DATABASE_URL=postgres://postgres:postgres@localhost:5432/nxtgauge_ai_assistant
|
|
|
|
OLLAMA_BASE_URL=http://localhost:11434
|
|
OLLAMA_CHAT_MODEL=smollm2:360m
|
|
OLLAMA_EMBED_MODEL=nomic-embed-text
|
|
|
|
HELP_CENTER_SEED_PATH=./seeds/help_articles.json
|
|
TICKETS_SOURCE=chatbot
|
|
NXTGAUGE_USERS_URL=http://localhost:9101
|
|
|
|
# Required: must match the JWT signing secret used by nxtgauge-backend-rust,
|
|
# and the AI service key nxtgauge-backend-rust expects on X-AI-Service-Key.
|
|
# Requests fail closed (401/500) if these are unset, rather than crashing.
|
|
JWT_SECRET=
|
|
AI_SERVICE_KEY=
|