mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-27 03:15:08 +00:00
fix(serve): close the developer dashboard when a config reload removes its key
This commit is contained in:
@@ -20,6 +20,9 @@ serve:
|
||||
```
|
||||
|
||||
Without `dashboard.key` the server does not register the routes, and they answer `404`.
|
||||
A config reload that removes the dashboard key closes the dashboard: the routes answer `404` and
|
||||
an open `/api/dashboard/events` connection ends. To add a dashboard key to a server that started
|
||||
without one, restart it.
|
||||
`serve --no-key` turns off user authentication only; the dashboard key stays required.
|
||||
Once the dashboard key is set, every `/api/dashboard/` request must carry it in
|
||||
`X-Secret-Key`.
|
||||
|
||||
@@ -161,7 +161,7 @@ is the [REST API](../../dev/rest-api/index.md) section. These are the config key
|
||||
| `tiers` | dict | `{}` | Named settings that `users` entries reference by name (see below). |
|
||||
| `services` | list | *(unset)* | Global service allowlist. Omit to allow all. |
|
||||
| `remote_only` | bool | `false` | Expose only the remote service session endpoints (health, services, search, session) and disable the rest of the REST API. |
|
||||
| `dashboard` | dict | *(unset)* | Developer dashboard: `key` is the API key for the read-only `/api/dashboard/` endpoints (status, remote sessions, remote session logs, jobs, keys, services, health, logs, SSE events). Unset leaves those routes unregistered. See [dashboard endpoints](../../dev/rest-api/dashboard.md). |
|
||||
| `dashboard` | dict | *(unset)* | Developer dashboard: `key` is the API key for the read-only `/api/dashboard/` endpoints (status, remote sessions, remote session logs, jobs, keys, services, health, logs, SSE events). Unset leaves those routes unregistered, and a reload that removes the key makes them answer `404`. See [dashboard endpoints](../../dev/rest-api/dashboard.md). |
|
||||
| `session_ttl` | int (s) | `300` | Seconds a remote session can stay idle before it expires. A remote client sends keep-alive requests to its remote session during a download, so the remote session does not expire during a long download. |
|
||||
| `max_sessions` | int or null | `100` | Maximum concurrent remote sessions; at the cap the server evicts the oldest remote session of the API key that holds the most. Set it to `null` or `0` for no limit, which is also what `/api/dashboard/status` then reports, so a dashboard can tell "no cap" from a cap that happens to sit at the default. |
|
||||
| `history_limit` | int | `100` | How many finished jobs to retain in history. |
|
||||
@@ -188,8 +188,10 @@ list.
|
||||
`tiers`, `services` and device lists in one step. Open CDM sessions and remote sessions
|
||||
continue; an API key you removed gets `401` on its next request. A file that does not parse
|
||||
or validate keeps the running settings and logs the reason. A change to `remote_only`,
|
||||
`services_refresh_interval`, the first PlayReady device, or any command-line flag needs
|
||||
a restart, and the log says so. A new `global_speed_limit` applies to jobs that start after the
|
||||
`services_refresh_interval`, the first PlayReady device, a `dashboard.key` on a server that
|
||||
started without one, or any command-line flag needs a restart, and the log says so. A reload
|
||||
that removes `dashboard.key` closes the dashboard: its routes answer `404` and an open
|
||||
`/api/dashboard/events` connection ends. A new `global_speed_limit` applies to jobs that start after the
|
||||
reload; running jobs keep their share. Windows has no `SIGHUP`: restart the server there.
|
||||
|
||||
`server_cdm` decides whether the server runs the CDM licensing for that API key. Set it to
|
||||
|
||||
Reference in New Issue
Block a user