mirror of
https://github.com/marcredhat/SIEM-toolkit-patched
synced 2026-06-08 20:37:12 +00:00
2e55e21a77
- Sidebar: ⚙ Settings link pinned to bottom of nav - Settings page: view all config keys (secrets masked), edit and save directly to .env - Show/hide toggle for secret fields (tokens, keys) - First-time setup banner with cp .env.example .env instructions when .env is missing - Manual setup section with step-by-step terminal commands and where to find each credential - New .env.example template with comments for all required variables - Backend: GET/POST /api/settings/config router reads/writes mounted .env file - docker-compose: mounts .env into backend container at /app/.env for write access Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
713 B
Python
26 lines
713 B
Python
from fastapi import FastAPI
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
from db import engine, Base
|
|
from routers import coverage, ingest, settings
|
|
|
|
Base.metadata.create_all(bind=engine)
|
|
|
|
app = FastAPI(title="SIEM Toolkit", version="1.0.0")
|
|
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=["http://localhost:3001"],
|
|
allow_credentials=True,
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|
|
|
|
app.include_router(coverage.router, prefix="/api/coverage", tags=["Coverage"])
|
|
app.include_router(ingest.router, prefix="/api/ingest", tags=["Ingest"])
|
|
app.include_router(settings.router, prefix="/api/settings", tags=["Settings"])
|
|
|
|
|
|
@app.get("/health")
|
|
def health():
|
|
return {"status": "ok"}
|