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:
@@ -7,7 +7,7 @@
|
|||||||
"contactEmail": "contact@ente.io",
|
"contactEmail": "contact@ente.io",
|
||||||
"tagline": "Open Source End-to-End Encrypted Photos & Authentication",
|
"tagline": "Open Source End-to-End Encrypted Photos & Authentication",
|
||||||
"upstreamVersion": "1.0.0",
|
"upstreamVersion": "1.0.0",
|
||||||
"version": "0.1.79",
|
"version": "0.1.80",
|
||||||
"healthCheckPath": "/ping",
|
"healthCheckPath": "/ping",
|
||||||
"httpPort": 3080,
|
"httpPort": 3080,
|
||||||
"memoryLimit": 1073741824,
|
"memoryLimit": 1073741824,
|
||||||
|
87
start.sh
87
start.sh
@@ -666,18 +666,91 @@ cat > "$CADDY_CONFIG" << EOF
|
|||||||
reverse_proxy localhost:8080
|
reverse_proxy localhost:8080
|
||||||
}
|
}
|
||||||
|
|
||||||
# Static files for Next.js assets from all apps
|
# Next.js assets for cast app
|
||||||
handle /_next/* {
|
handle_path /cast/_next/* {
|
||||||
@photosNext path /_next/*
|
root * /app/web/cast
|
||||||
handle @photosNext {
|
file_server
|
||||||
root * /app/web/photos
|
|
||||||
file_server
|
|
||||||
}
|
|
||||||
header {
|
header {
|
||||||
Cache-Control "public, max-age=31536000"
|
Cache-Control "public, max-age=31536000"
|
||||||
Access-Control-Allow-Origin "*"
|
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
|
# Photos app
|
||||||
handle_path /photos/* {
|
handle_path /photos/* {
|
||||||
|
Reference in New Issue
Block a user