Improve PWA offline functionality and fix session caching
- Enable navigateFallback for offline navigation support - Add JSON files to glob patterns for heroicons support - Change Authentik API caching from NetworkFirst to NetworkOnly to prevent stale session data - Add offline detection in checkSessionStatus with proper user feedback - Add no-cache headers to /api/auth/status endpoint to prevent browser caching - Show "Modo Offline" toast when user tries to check session while offline
This commit is contained in:
@@ -3,6 +3,13 @@
|
||||
* Consulta los headers inyectados por Authentik Proxy Outpost
|
||||
*/
|
||||
export default defineEventHandler((event) => {
|
||||
// Establecer headers para prevenir caching
|
||||
setResponseHeaders(event, {
|
||||
'Cache-Control': 'no-store, no-cache, must-revalidate, proxy-revalidate',
|
||||
'Pragma': 'no-cache',
|
||||
'Expires': '0'
|
||||
})
|
||||
|
||||
// Leer headers de Authentik en tiempo real
|
||||
const headers = getHeaders(event)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user