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:
@@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user