Skip to content

Commit 6b33775

Browse files
authored
fix: adjust badge api caching strategy (#1246)
1 parent e19c394 commit 6b33775

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

nuxt.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ export default defineNuxtConfig({
8888
routeRules: {
8989
// API routes
9090
'/api/**': { isr: 60 },
91+
'/api/registry/badge/**': {
92+
isr: {
93+
expiration: 60 * 60 /* one hour */,
94+
passQuery: true,
95+
allowQuery: ['color', 'labelColor', 'label', 'name'],
96+
},
97+
},
9198
'/api/registry/docs/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
9299
'/api/registry/file/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
93100
'/api/registry/provenance/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },

0 commit comments

Comments
 (0)