always serve embedded frontend

This commit is contained in:
2026-07-10 15:04:29 +00:00
parent 1be698a802
commit e3356200a8
10 changed files with 42 additions and 59 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ when a query string follows the slash.
## Health and frontend
- `GET /` serves the embedded frontend when `production=false`.
- `GET /` serves the embedded frontend.
- `GET /api/health` returns HTTP 200:
```json
+2 -1
View File
@@ -24,9 +24,10 @@ ushort legacy-config.json
| `max_retention_days` | no | `3650` | Maximum per-URL retention value. |
| `rate_limit_requests` | no | `60` | Requests allowed per client/window. |
| `rate_limit_window` | no | `60` | Sliding-window length in seconds. |
| `production` | no | `false` | Disable embedded frontend routes when a separate server provides them. |
The legacy `short_length` option remains an alias for `min_short_length`.
The removed legacy `production` key is ignored when present; ushort always
serves its embedded frontend and static assets.
## Public URL layouts
+4 -5
View File
@@ -19,13 +19,12 @@ the server as `docker-compose.yml`. For repeatable releases, replace its image
tag with the verified multi-architecture digest:
```yaml
image: docker.io/sodium/ushort:0.1.1@sha256:<verified-index-digest>
image: docker.io/sodium/ushort:0.1.2@sha256:<verified-index-digest>
```
Set `db_path = "data/urlshort.db"` and normally keep `production = false` so
the executable serves its embedded frontend. Keep `config.toml` owned by the
container identity (`1001:1001`) with mode `0400`; the `data` directory must be
writable by the same identity.
Set `db_path = "data/urlshort.db"`. The executable always serves its embedded
frontend. Keep `config.toml` owned by the container identity (`1001:1001`) with
mode `0400`; the `data` directory must be writable by the same identity.
## Start and validate
+4 -3
View File
@@ -8,9 +8,10 @@ actions, API-key administration, sorting, pagination, theme selection, and
locally hosted fonts. Relative asset URLs and the browser-derived API prefix
allow the same files to work at either a subdomain root or a nested path.
Set `production = false` for the normal self-contained deployment. Setting it
to `true` disables the embedded frontend routes for installations that serve
those files separately.
The frontend and static assets are always available. The former `production`
toggle was removed because disabling embedded assets conflicts with ushort's
self-contained deployment model. Old configuration files containing that key
remain loadable; its value is ignored.
The nginx examples apply `no-store` to the HTML entry point and `no-cache` to
static assets. Embedded static requests do not consume the API rate-limit