fix: workbox precache conflict + clean up duplicate API routes
- Exclude assets/icon/** from workbox globPatterns (already in includeAssets) - Remove duplicate /api/* and /aiui/api/web-search routes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
255d0c2a78
commit
4bbae540ed
@ -1016,13 +1016,6 @@ app.get('/app/filebrowser/api/raw/*', (req, res) => {
|
||||
}
|
||||
})
|
||||
|
||||
// =============================================================================
|
||||
// AIUI Web Search stub (demo mode — no real search backend)
|
||||
// =============================================================================
|
||||
app.get('/aiui/api/web-search', (req, res) => {
|
||||
res.json({ results: [] })
|
||||
})
|
||||
|
||||
// Claude API Proxy (reads ANTHROPIC_API_KEY from environment)
|
||||
// =============================================================================
|
||||
import https from 'https'
|
||||
@ -1097,11 +1090,6 @@ app.all('/aiui/api/*', (req, res) => {
|
||||
res.status(404).json({ error: 'Not available in demo mode' })
|
||||
})
|
||||
|
||||
// General /api/ catch-all
|
||||
app.all('/api/*', (req, res) => {
|
||||
res.status(404).json({ error: 'Not found' })
|
||||
})
|
||||
|
||||
// Health check
|
||||
app.get('/health', (req, res) => {
|
||||
res.status(200).send('healthy')
|
||||
|
||||
@ -44,6 +44,7 @@ export default defineConfig({
|
||||
'**/*-1.47mb.mp4',
|
||||
'**/bg-*.mp4', // Exclude large background videos from precache
|
||||
'**/video-intro.mp4', // Exclude video-intro.mp4 from precache (7MB, cached at runtime)
|
||||
'**/assets/icon/**', // Icons are in includeAssets — don't duplicate in glob precache
|
||||
],
|
||||
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, // 5MB limit (increased from 2MB)
|
||||
skipWaiting: false, // Wait for user to accept update
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user