Rotate Livewire release_token per deploy for cache-busting #26
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
config/livewire.phpshipsrelease_token => 'a'(Livewire's upstream default). This token is sent to clients and used to detect stale sessions after a deploy — when the token changes, Livewire prompts users to refresh. With a static token, the prompt never fires, so users on stale tabs hit cryptic Livewire errors after a deploy.Acceptance
config/livewire.php:'release_token' => env('LIVEWIRE_RELEASE_TOKEN', 'a')docker/prod/start.sh, setLIVEWIRE_RELEASE_TOKENfrom a build-time identifier (git SHA, image tag, or build timestamp). Pick whichever the prod build pipeline already exposes —IMAGE_TAGenv var passed by Forgejo Actions is the cheapest if present.APP_KEY,DB_*Notes
'a'in dev (no env var) — that's fine, dev users don't need cache-busting prompts.