Skip to content

Commit 98b3103

Browse files
authored
fix(api): disable cache and prerender on /api/_hub/** (#414)
1 parent 46fc4e3 commit 98b3103

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/features.ts

+2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ export function setupBase(nuxt: Nuxt, hub: HubConfig) {
7676
nuxt.options.routeRules['/api/_hub/**'] = nuxt.options.routeRules['/api/_hub/**'] || {}
7777
// @ts-expect-error csurf is not typed here
7878
nuxt.options.routeRules['/api/_hub/**'].csurf = false
79+
nuxt.options.routeRules['/api/_hub/**'].cache = false
80+
nuxt.options.routeRules['/api/_hub/**'].prerender = false
7981
// Add X-Robots-Tag: noindex
8082
if (!nuxt.options.dev && hub.env === 'preview') {
8183
nuxt.options.routeRules['/**'] ||= {}

0 commit comments

Comments
 (0)