You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: implement subdomain-based bundle preview for assets to work correctly
Add wildcard subdomain routes (*.preview.capgo.app) to serve bundle previews
from root path, allowing all assets (JS, CSS, etc.) to work correctly without
path rewriting. New preview_subdomain handler uses cookie-based auth to persist
tokens across asset requests. Format: {app_id}-{version_id}.preview.capgo.app
🤖 Generated with Claude Code
Co-Authored-By: Claude Haiku 4.5 <[email protected]>
* refactor: consolidate preview handlers into single subdomain-based file
Remove redundant path-based preview handler and keep only the subdomain
approach. Rename preview_subdomain.ts to preview.ts for simplicity.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* fix: correct import order in preview.ts
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
---------
Co-authored-by: Claude Haiku 4.5 <[email protected]>
@@ -156,7 +197,6 @@ async function handlePreview(c: Context<MiddlewareKeyVariables>) {
156
197
}
157
198
158
199
// Preview only works on Cloudflare Workers where the R2 bucket is available.
159
-
// Supabase Edge Functions cannot serve HTML files properly due to platform limitations.
160
200
if(getRuntimeKey()!=='workerd'){
161
201
cloudlog({requestId: c.get('requestId'),message: 'preview not supported on Supabase Edge Functions'})
162
202
returnsimpleError('preview_not_supported','Preview is not supported on Supabase Edge Functions. This feature requires Cloudflare Workers with R2 bucket access.')
@@ -183,11 +223,36 @@ async function handlePreview(c: Context<MiddlewareKeyVariables>) {
0 commit comments