#SOLVED: routeRule wildCard (/*) ignores overwrites

1 messages · Page 1 of 1 (latest)

rough kraken
#

We're using nitros routeRules to store pregenerated html in a cloudflare KV.

We want all pages to have a cache wrapper and specify it via
'/*': { swr: 60 },

There is also sensitive user based content that should not be cached.
'/user/*': { ssr: false, swr: false, cache: false },

That does generate the following nitro.routeRules

      "/*": {
        "swr": 60,
        "cache": {
          "swr": true,
          "maxAge": 60
        }
      },
      "/user/*": {
        "ssr": false,
        "swr": false,
        "cache": false
      },

Now I'd expect any page behind user/ to be ignored but there are payload.jsons generated on initial call.

Am I missing anything?

Reproduction:
https://stackblitz.com/edit/nuxt-starter-lvav3e?file=package.json,pages%2Findex.vue,app.vue,pages%2Fcontent.vue,pages%2Fuser%2Findex.vue,pages%2Fuser%2F[order].vue,nuxt.config.ts

StackBlitz

A Nuxt.js project based on nuxt

terse grotto
#

we use double *

rough kraken
#

and that actually fixes it, I can't believe it 😆 thank you so much