From 3748c26c679344eae1d2732800bfd87ad21bf64f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Wed, 8 Jan 2025 16:41:51 +0100 Subject: [PATCH] fix(api): disable cache and prerender on internal hub api route partially fix #413 --- src/features.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/features.ts b/src/features.ts index 9416e4a0..5919aa59 100644 --- a/src/features.ts +++ b/src/features.ts @@ -76,6 +76,8 @@ export function setupBase(nuxt: Nuxt, hub: HubConfig) { nuxt.options.routeRules['/api/_hub/**'] = nuxt.options.routeRules['/api/_hub/**'] || {} // @ts-expect-error csurf is not typed here nuxt.options.routeRules['/api/_hub/**'].csurf = false + nuxt.options.routeRules['/api/_hub/**'].cache = false + nuxt.options.routeRules['/api/_hub/**'].prerender = false // Add X-Robots-Tag: noindex if (!nuxt.options.dev && hub.env === 'preview') { nuxt.options.routeRules['/**'] ||= {}