seguimos con la seguridad
All checks were successful
build-and-deploy / build (push) Successful in 26s
build-and-deploy / deploy (push) Successful in 4s

This commit is contained in:
2025-10-11 18:28:49 -06:00
parent d966fab4ca
commit 811b525cfc
2 changed files with 30 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ services:
# ==========================================
# Router público para recursos PWA (sin autenticación)
# ==========================================
- "traefik.http.routers.musica-nucleoriofrio-public.rule=Host(`musica.nucleoriofrio.com`) && (PathPrefix(`/_nuxt`) || PathPrefix(`/assets`) || Path(`/sw.js`) || PathPrefix(`/workbox-`) || Path(`/manifest.webmanifest`) || Path(`/manifest.json`) || Path(`/favicon.ico`) || Path(`/logo.png`) || Path(`/logo-192.png`) || Path(`/logo-512.png`) || Path(`/logo-maskable-512.png`) || Path(`/icon.svg`))"
- "traefik.http.routers.musica-nucleoriofrio-public.rule=Host(`musica.nucleoriofrio.com`) && (PathPrefix(`/_nuxt`) || PathPrefix(`/assets`) || Path(`/sw.js`) || PathPrefix(`/workbox-`) || Path(`/manifest.webmanifest`) || Path(`/manifest.json`) || Path(`/robots.txt`) || Path(`/favicon.ico`) || Path(`/logo.png`) || Path(`/logo-192.png`) || Path(`/logo-512.png`) || Path(`/logo-maskable-512.png`) || Path(`/icon.svg`))"
- "traefik.http.routers.musica-nucleoriofrio-public.entrypoints=websecure"
- "traefik.http.routers.musica-nucleoriofrio-public.tls.certresolver=letsencrypt"
- "traefik.http.routers.musica-nucleoriofrio-public.priority=100"

View File

@@ -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,
@@ -207,6 +227,14 @@ export default defineNuxtConfig({
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: {
public: {