feat(api): Add endpoints for webpanel decoy management using background tasks
- Add POST `/api/v1/config/hysteria/webpanel/decoy/setup` endpoint to configure the decoy site. - Add POST `/api/v1/config/hysteria/webpanel/decoy/stop` endpoint to remove the decoy site configuration. - Implement `BackgroundTasks` for both endpoints to prevent Caddy service restarts from interrupting the API response. - Add `SetupDecoyRequest` Pydantic schema for the setup endpoint payload.
This commit is contained in:
@ -10,6 +10,7 @@ class Configs(BaseSettings):
|
||||
API_TOKEN: str
|
||||
EXPIRATION_MINUTES: int
|
||||
ROOT_PATH: str
|
||||
DECOY_PATH: str | None = None
|
||||
|
||||
class Config:
|
||||
env_file = '.env'
|
||||
|
||||
Reference in New Issue
Block a user