Fix static asset routing for all web apps

- Add specific _next asset routes for accounts, auth, cast apps
- Add image asset routes for each app
- Ensure each app's assets are served from correct directory
- Keep photos app routing unchanged

Should fix accounts/auth/cast apps loading issues.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andreas Dueren
2025-08-01 13:55:53 -06:00
parent f9171c6ca4
commit a0af6ec84c
2 changed files with 81 additions and 8 deletions

View File

@@ -7,7 +7,7 @@
"contactEmail": "contact@ente.io",
"tagline": "Open Source End-to-End Encrypted Photos & Authentication",
"upstreamVersion": "1.0.0",
"version": "0.1.79",
"version": "0.1.80",
"healthCheckPath": "/ping",
"httpPort": 3080,
"memoryLimit": 1073741824,

View File

@@ -666,19 +666,92 @@ cat > "$CADDY_CONFIG" << EOF
reverse_proxy localhost:8080
}
# Static files for Next.js assets from all apps
handle /_next/* {
@photosNext path /_next/*
handle @photosNext {
root * /app/web/photos
# Next.js assets for cast app
handle_path /cast/_next/* {
root * /app/web/cast
file_server
}
header {
Cache-Control "public, max-age=31536000"
Access-Control-Allow-Origin "*"
}
}
# Next.js assets for accounts app
handle_path /accounts/_next/* {
root * /app/web/accounts
file_server
header {
Cache-Control "public, max-age=31536000"
Access-Control-Allow-Origin "*"
}
}
# Next.js assets for auth app
handle_path /auth/_next/* {
root * /app/web/auth
file_server
header {
Cache-Control "public, max-age=31536000"
Access-Control-Allow-Origin "*"
}
}
# Next.js assets for photos app
handle_path /photos/_next/* {
root * /app/web/photos
file_server
header {
Cache-Control "public, max-age=31536000"
Access-Control-Allow-Origin "*"
}
}
# Generic _next assets (fallback to photos)
handle /_next/* {
root * /app/web/photos
file_server
header {
Cache-Control "public, max-age=31536000"
Access-Control-Allow-Origin "*"
}
}
# Images for cast app
handle_path /cast/images/* {
root * /app/web/cast
file_server
header {
Cache-Control "public, max-age=86400"
}
}
# Images for accounts app
handle_path /accounts/images/* {
root * /app/web/accounts
file_server
header {
Cache-Control "public, max-age=86400"
}
}
# Images for auth app
handle_path /auth/images/* {
root * /app/web/auth
file_server
header {
Cache-Control "public, max-age=86400"
}
}
# Images for photos app
handle_path /photos/images/* {
root * /app/web/photos
file_server
header {
Cache-Control "public, max-age=86400"
}
}
# Photos app
handle_path /photos/* {
root * /app/web/photos