Fix CloudFront routing and TypeScript type safety

- Update CloudFront Function to handle Next.js static export .html files
- Fix TypeScript interface for color request service (add required user_phone field)
- Update ColorRequestForm component to include phone field
This commit is contained in:
DaX
2025-11-19 18:56:08 +01:00
parent f6f9da9c5b
commit 17edfc8794
3 changed files with 26 additions and 4 deletions

View File

@@ -8,8 +8,9 @@ function handler(event) {
if (uri.endsWith('/')) {
request.uri += 'index.html';
} else {
// Add /index.html to directory paths
request.uri += '/index.html';
// For Next.js static export, try .html first
// CloudFront will handle 404s via custom error response
request.uri += '.html';
}
}