seguimos con la seguridad
This commit is contained in:
@@ -62,6 +62,24 @@ export default defineNuxtConfig({
|
||||
'_nuxt/builds/**/*.json',
|
||||
],
|
||||
runtimeCaching: [
|
||||
// Nuxt build metadata: Network-Only with graceful fallback for offline
|
||||
{
|
||||
urlPattern: /\/_nuxt\/builds\/(meta|latest)\/.*\.json$/,
|
||||
handler: 'NetworkOnly',
|
||||
options: {
|
||||
plugins: [
|
||||
{
|
||||
// Fail silently when offline - these are HMR/build metadata files
|
||||
handlerDidError: async () => {
|
||||
return new Response(JSON.stringify({}), {
|
||||
status: 200,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
// Static images: Cache-First (offline-ready)
|
||||
{
|
||||
urlPattern: /\.(png|jpg|jpeg|svg|gif|webp|ico)$/,
|
||||
@@ -197,7 +215,9 @@ export default defineNuxtConfig({
|
||||
// Nitro configuration for proxy support
|
||||
nitro: {
|
||||
experimental: {
|
||||
wasm: true
|
||||
wasm: true,
|
||||
// Disable payload extraction in SPA mode to avoid build metadata fetches
|
||||
payloadExtraction: false
|
||||
},
|
||||
prerender: {
|
||||
crawlLinks: true,
|
||||
@@ -206,6 +226,14 @@ export default defineNuxtConfig({
|
||||
// Development configuration for proxy
|
||||
devProxy: process.env.NODE_ENV === 'development' ? {} : undefined
|
||||
},
|
||||
|
||||
// App configuration
|
||||
app: {
|
||||
// Disable build manifest fetching in production
|
||||
buildAssetsDir: '/_nuxt/',
|
||||
// Disable automatic payload extraction
|
||||
keepalive: false
|
||||
},
|
||||
|
||||
// Runtime configuration
|
||||
runtimeConfig: {
|
||||
|
||||
Reference in New Issue
Block a user