AptLarder::AdminConfig
Inherits YAML::Serializable / Reference / Object
Configuration for the admin HTTP server.
The admin server exposes a JSON REST API (/api/*) for programmatic cache
management and an optional web UI (/*) that consumes it. Both run on a
dedicated port, separate from the main proxy port.
Authentication
Two independent auth mechanisms are supported:
- API (
/api/*): HTTP Bearer token. Setapi_tokento a non-empty string; clients must sendAuthorization: Bearer <token>. - UI (
/*): HTTP Basic Auth. Set bothui_userandui_password; browsers will prompt for credentials.
Leaving a credential field empty disables auth for that path.
The admin server is disabled by default (enabled: false).
Example config
admin:
enabled: true
host: "127.0.0.1"
port: 8080
api_token: "change-me"
ui_user: "admin"
ui_password: "change-me"
Constructors
Instance methods
Bearer token required for all /api/* requests.
Empty string disables authentication for the API (allow-all).
Bearer token required for all /api/* requests.
Empty string disables authentication for the API (allow-all).
IP address the admin server binds to.
Defaults to loopback (127.0.0.1). Do not change to 0.0.0.0
unless authentication is configured.
IP address the admin server binds to.
Defaults to loopback (127.0.0.1). Do not change to 0.0.0.0
unless authentication is configured.
Username for HTTP Basic Auth on the web UI (/*).
Both ui_user and ui_password must be non-empty to enable auth.