You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inject Koios JWT at build time from a GH Actions secret.
The Koios JWT is still public — it ends up in the JS bundle by design — but hard-coding it in `src/plugins/vue-cardano.js` *and* `src/App.vue` meant every rotation was a two-file source edit plus a release. Wire it through a build-time env var so the next rotation is a Settings → Secrets edit and a redeploy.
Updates include:
- Both `koios_key` declarations now read `process.env.VUE_APP_KOIOS_JWT` (the Vue CLI convention — webpack's DefinePlugin inlines `VUE_APP_*` vars into the client bundle at build time), falling back to a hard-coded default so `npm run serve` keeps working with no `.env.local` setup. The fallback has been refreshed to the JWT issued today (the previous embedded token expired in Jan 2026); future rotations only need to update the GitHub secret.
- `.github/workflows/deploy.yaml` and `.github/workflows/ci.yaml` now forward `secrets.KOIOS_JWT` into the `npm run build` step as `VUE_APP_KOIOS_JWT`. CI builds against the same secret so PR builds match production. When the secret isn't set in a fork's CI, the fallback kicks in and the build still passes.
- `.env.example` documents the variable for anyone running locally who wants to point at a different Koios project without touching source.
0 commit comments