Skip to content

Commit

Permalink
fix(api): disable cache and prerender on /api/_hub/** (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux authored Jan 8, 2025
1 parent 46fc4e3 commit 98b3103
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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['/**'] ||= {}
Expand Down

0 comments on commit 98b3103

Please sign in to comment.