Skip to content

add server-side audio proxy for S3 media files#159

Merged
mfwolffe merged 1 commit intoLab-Lab-Lab:mainfrom
espadonne:main
Apr 2, 2026
Merged

add server-side audio proxy for S3 media files#159
mfwolffe merged 1 commit intoLab-Lab-Lab:mainfrom
espadonne:main

Conversation

@espadonne
Copy link
Copy Markdown

Summary

  • Django doesn't serve /media/ in production (uses S3 storage), so the existing Next.js rewrite to the backend returned 404
  • Adds /api/audio-proxy route that fetches S3 URLs server-side (no CORS), returns audio same-origin
  • Routes Activity 3 bassline URL through the proxy instead of stripping the S3 origin

Fixes bassline import in Activity 3: waveform not loading and duration showing 0:00 on dev.musiccpr.org.

Django doesn't serve /media/ in production (S3 storage), so the
existing rewrite to the backend returned 404. Route bassline URLs
through /api/audio-proxy which fetches server-side (no CORS).
@mfwolffe mfwolffe merged commit f6c16e2 into Lab-Lab-Lab:main Apr 2, 2026
1 check passed
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