mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-02 04:20:50 +08:00
Add JSON annotations to configuration structs and new /config management endpoint
- Added JSON annotations across all configuration structs in `config.go`. - Introduced `/config` management API endpoint to fetch complete configuration. - Updated management API documentation (`MANAGEMENT_API.md`, `MANAGEMENT_API_CN.md`) with `/config` usage. - Implemented `GetConfig` handler in `config_basic.go`.
This commit is contained in:
@@ -150,6 +150,8 @@ func (s *Server) setupRoutes() {
|
||||
mgmt := s.engine.Group("/v0/management")
|
||||
mgmt.Use(s.mgmt.Middleware())
|
||||
{
|
||||
mgmt.GET("/config", s.mgmt.GetConfig)
|
||||
|
||||
mgmt.GET("/debug", s.mgmt.GetDebug)
|
||||
mgmt.PUT("/debug", s.mgmt.PutDebug)
|
||||
mgmt.PATCH("/debug", s.mgmt.PutDebug)
|
||||
|
||||
Reference in New Issue
Block a user