Fix static asset routing and path handling for auth/accounts/cast apps
- Fixed Next.js static asset (_next/*) routing for each app separately - Updated app path handling to work with both /app and /app/* patterns - Resolved 404 errors for static assets from auth, accounts, and cast apps - Updated to version 0.1.66
This commit is contained in:
40
start.sh
40
start.sh
@@ -702,14 +702,38 @@ cat > "$CADDY_CONFIG" << EOF
|
||||
reverse_proxy localhost:8080
|
||||
}
|
||||
|
||||
# Static files for Next.js assets from all apps
|
||||
handle /_next/* {
|
||||
# Static files for Next.js assets - handle per app
|
||||
handle_path /photos/_next/* {
|
||||
root * /app/web/photos
|
||||
file_server
|
||||
header {
|
||||
Cache-Control "public, max-age=31536000"
|
||||
}
|
||||
}
|
||||
|
||||
handle_path /accounts/_next/* {
|
||||
root * /app/web/accounts
|
||||
file_server
|
||||
header {
|
||||
Cache-Control "public, max-age=31536000"
|
||||
}
|
||||
}
|
||||
|
||||
handle_path /auth/_next/* {
|
||||
root * /app/web/auth
|
||||
file_server
|
||||
header {
|
||||
Cache-Control "public, max-age=31536000"
|
||||
}
|
||||
}
|
||||
|
||||
handle_path /cast/_next/* {
|
||||
root * /app/web/cast
|
||||
file_server
|
||||
header {
|
||||
Cache-Control "public, max-age=31536000"
|
||||
}
|
||||
}
|
||||
|
||||
# Static images and assets (served from photos app by default)
|
||||
handle /images/* {
|
||||
@@ -735,22 +759,22 @@ cat > "$CADDY_CONFIG" << EOF
|
||||
file_server
|
||||
}
|
||||
|
||||
# Accounts app
|
||||
handle_path /accounts/* {
|
||||
# Accounts app - handle both /accounts and /accounts/*
|
||||
handle /accounts* {
|
||||
root * /app/web/accounts
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
|
||||
# Auth app
|
||||
handle_path /auth/* {
|
||||
# Auth app - handle both /auth and /auth/*
|
||||
handle /auth* {
|
||||
root * /app/web/auth
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
|
||||
# Cast app
|
||||
handle_path /cast/* {
|
||||
# Cast app - handle both /cast and /cast/*
|
||||
handle /cast* {
|
||||
root * /app/web/cast
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
|
Reference in New Issue
Block a user