seguimos con la seguridad
This commit is contained in:
@@ -19,7 +19,7 @@ services:
|
|||||||
# ==========================================
|
# ==========================================
|
||||||
# Router público para recursos PWA (sin autenticación)
|
# 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.entrypoints=websecure"
|
||||||
- "traefik.http.routers.musica-nucleoriofrio-public.tls.certresolver=letsencrypt"
|
- "traefik.http.routers.musica-nucleoriofrio-public.tls.certresolver=letsencrypt"
|
||||||
- "traefik.http.routers.musica-nucleoriofrio-public.priority=100"
|
- "traefik.http.routers.musica-nucleoriofrio-public.priority=100"
|
||||||
|
|||||||
@@ -62,6 +62,24 @@ export default defineNuxtConfig({
|
|||||||
'_nuxt/builds/**/*.json',
|
'_nuxt/builds/**/*.json',
|
||||||
],
|
],
|
||||||
runtimeCaching: [
|
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)
|
// Static images: Cache-First (offline-ready)
|
||||||
{
|
{
|
||||||
urlPattern: /\.(png|jpg|jpeg|svg|gif|webp|ico)$/,
|
urlPattern: /\.(png|jpg|jpeg|svg|gif|webp|ico)$/,
|
||||||
@@ -197,7 +215,9 @@ export default defineNuxtConfig({
|
|||||||
// Nitro configuration for proxy support
|
// Nitro configuration for proxy support
|
||||||
nitro: {
|
nitro: {
|
||||||
experimental: {
|
experimental: {
|
||||||
wasm: true
|
wasm: true,
|
||||||
|
// Disable payload extraction in SPA mode to avoid build metadata fetches
|
||||||
|
payloadExtraction: false
|
||||||
},
|
},
|
||||||
prerender: {
|
prerender: {
|
||||||
crawlLinks: true,
|
crawlLinks: true,
|
||||||
@@ -207,6 +227,14 @@ export default defineNuxtConfig({
|
|||||||
devProxy: process.env.NODE_ENV === 'development' ? {} : undefined
|
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
|
// Runtime configuration
|
||||||
runtimeConfig: {
|
runtimeConfig: {
|
||||||
public: {
|
public: {
|
||||||
|
|||||||
Reference in New Issue
Block a user