- POST /api/__journal__/cache/purge removes every Nitro route-cache entry - 404 without a 32-character token or behind a proxy, 401 on a wrong bearer token (constant-time over sha256 digests) - routeRules keep /api/__journal__/** out of the route cache - runtimeConfig.journal.cachePurgeToken (NUXT_JOURNAL_CACHE_PURGE_TOKEN) - fixture API reload(); testing/purge-check.mjs proves a cached page shows a change after a purge; the playground caches with swr 300
19 lines
627 B
TypeScript
19 lines
627 B
TypeScript
// Local playground: an app that only extends the layer, with en as the
|
|
// default locale and pl prefixed, the same shape the git-install check uses.
|
|
export default defineNuxtConfig({
|
|
extends: ['..'],
|
|
compatibilityDate: '2025-07-15',
|
|
site: { url: 'https://acme.test', name: 'Acme Blog' },
|
|
// Route-cached like a real host, so testing/purge-check.mjs can prove a
|
|
// purge clears cached pages.
|
|
routeRules: { '/**': { swr: 300 } },
|
|
i18n: {
|
|
strategy: 'prefix_except_default',
|
|
defaultLocale: 'en',
|
|
locales: [
|
|
{ code: 'en', language: 'en-US' },
|
|
{ code: 'pl', language: 'pl-PL' },
|
|
],
|
|
},
|
|
})
|