Implementar link handling y asociación con PWA hub
- Agregar capture_links en manifest para mejorar experiencia PWA - Crear archivo .well-known para asociación con inicio.nucleoriofrio.com - Actualizar Traefik para servir recursos PWA y .well-known sin autenticación
This commit is contained in:
@@ -32,9 +32,9 @@ services:
|
|||||||
# Service
|
# Service
|
||||||
- "traefik.http.services.${APP_NAME}.loadbalancer.server.port=3000"
|
- "traefik.http.services.${APP_NAME}.loadbalancer.server.port=3000"
|
||||||
|
|
||||||
# Router para assets estáticos de Nuxt (sin autenticación) - mayor prioridad
|
# Router para assets estáticos de Nuxt y PWA (sin autenticación) - mayor prioridad
|
||||||
# SOLO /_nuxt/* para que la aplicación funcione
|
# Incluye recursos PWA y .well-known para scope extensions
|
||||||
- "traefik.http.routers.${APP_NAME}-public.rule=Host(`${APP_DOMAIN}`) && PathPrefix(`/_nuxt`)"
|
- "traefik.http.routers.${APP_NAME}-public.rule=Host(`${APP_DOMAIN}`) && (PathPrefix(`/_nuxt`) || PathPrefix(`/.well-known`) || PathPrefix(`/icons`) || Path(`/manifest.webmanifest`) || Path(`/sw.js`) || PathPrefix(`/workbox-`) || Path(`/favicon.ico`))"
|
||||||
- "traefik.http.routers.${APP_NAME}-public.entrypoints=websecure"
|
- "traefik.http.routers.${APP_NAME}-public.entrypoints=websecure"
|
||||||
- "traefik.http.routers.${APP_NAME}-public.tls=true"
|
- "traefik.http.routers.${APP_NAME}-public.tls=true"
|
||||||
- "traefik.http.routers.${APP_NAME}-public.tls.certresolver=letsencrypt"
|
- "traefik.http.routers.${APP_NAME}-public.tls.certresolver=letsencrypt"
|
||||||
|
|||||||
@@ -89,6 +89,8 @@ export default defineNuxtConfig({
|
|||||||
display: 'standalone',
|
display: 'standalone',
|
||||||
background_color: '#1b1209',
|
background_color: '#1b1209',
|
||||||
theme_color: '#c08040',
|
theme_color: '#c08040',
|
||||||
|
// Capturar enlaces dentro de la app
|
||||||
|
capture_links: 'existing-client-navigate',
|
||||||
icons: [
|
icons: [
|
||||||
{ src: '/icons/icon-192.png', sizes: '192x192', type: 'image/png' },
|
{ src: '/icons/icon-192.png', sizes: '192x192', type: 'image/png' },
|
||||||
{ src: '/icons/icon-512.png', sizes: '512x512', type: 'image/png' },
|
{ src: '/icons/icon-512.png', sizes: '512x512', type: 'image/png' },
|
||||||
|
|||||||
10
nuxt4-app/public/.well-known/web-app-origin-association
Normal file
10
nuxt4-app/public/.well-known/web-app-origin-association
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"web_apps": [
|
||||||
|
{
|
||||||
|
"manifest": "https://inicio.nucleoriofrio.com/manifest.webmanifest",
|
||||||
|
"details": {
|
||||||
|
"paths": ["/*"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user