feat: add SQLite persistence and REST API for temporary whitelisting
- Migrate IP-based temporary whitelisting from file to SQLite storage - Add REST API endpoints for managing temporary and permanent whitelists - Create `.env.example` with required environment variables - Document API endpoints in README.md and docs/api.md - Add new dependency `modernc.org/sqlite` for SQLite support - Update deployment and security documentation
This commit is contained in:
@@ -19,7 +19,7 @@ func loadConfig() Config {
|
||||
APIToken: getEnv("AUTH_GATE_API_TOKEN", ""),
|
||||
DataDir: getEnv("DATA_DIR", "/data"),
|
||||
CleanupInterval: parseDuration("CLEANUP_INTERVAL", 60*time.Second),
|
||||
DBPath: getEnv("AUTH_GATE_DB_PATH", "/data/auth-gate.db"),
|
||||
DBPath: getEnv("AUTH_GATE_DB_PATH", "./data/auth-gate.db"),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,4 +38,4 @@ func parseDuration(key string, defaultVal time.Duration) time.Duration {
|
||||
}
|
||||
}
|
||||
return defaultVal
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user