Skip to content

Fix: force re-upload index.html on every frontend deployment#31

Merged
TimPolk merged 3 commits intomainfrom
Fix/deployment
Apr 1, 2026
Merged

Fix: force re-upload index.html on every frontend deployment#31
TimPolk merged 3 commits intomainfrom
Fix/deployment

Conversation

@YounBrand
Copy link
Copy Markdown
Collaborator

@YounBrand YounBrand commented Apr 1, 2026

PATCH was missing from the API Gateway CORS allow_methods, causing the browser's preflight request for PATCH /api/auth/profile to be rejected before reaching Lambda — blocking the bank linking flow at budget generation. Also added PLAID_CLIENT_ID, PLAID_SECRET, PLAID_ENV, BREVO_API_KEY, EMAIL_FROM, and EMAIL_FROM_NAME to the Lambda environment in Terraform, which were present in AWS but missing from the config and would have been wiped on the next terraform apply.

aws s3 sync was skipping index.html because Vite builds produce the same file size between deploys (only the 8-char content hash in the asset filenames changes). This left a stale index.html in S3 referencing JS chunk names that no longer existed, causing a MIME type error that broke the entire app on every deployment.

  • Add --exact-timestamps to aws s3 sync so files are compared by modification time, not just size
  • Force re-upload index.html with aws s3 cp after the sync to guarantee it's always current

@YounBrand YounBrand marked this pull request as draft April 1, 2026 13:57
@YounBrand YounBrand marked this pull request as ready for review April 1, 2026 14:17
@YounBrand YounBrand marked this pull request as draft April 1, 2026 14:24
@YounBrand YounBrand marked this pull request as ready for review April 1, 2026 14:40
@TimPolk TimPolk merged commit aef370d into main Apr 1, 2026
1 check passed
@YounBrand YounBrand deleted the Fix/deployment branch April 4, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants