Skip to content

fix(cli): Expo icon fonts 500 behind the app-server proxy; exclude all of .codeam/ - #1033

Merged
edgar-durand merged 1 commit into
mainfrom
fix/preview-proxy-origin
Nov 23, 2026
Merged

edgar-durand merged 1 commit into
mainfrom
fix/preview-proxy-origin

Conversation

@edgar-durand

@edgar-durand edgar-durand commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Live check of v2.76.51 on the owner's codespace (Pasito). The app rendered, __REMIX_SERVER_BASE__ was set, and register/login went through wrangler with D1 persistence. But every icon showed as a box: /assets/?unstable_path=…Feather.ttf answered 500. The browser sends Origin; the proxy rewrote Host to localhost:<port> and left the public Origin, and Expo's dev middleware rejects a foreign origin with a 500 (default-src 'none'). Verified on the box: public Origin gives 500, http://localhost:8081 gives 200.

The .git/info/exclude lines /.codeam/* + !/.codeam/preview.json still left our auto-written preview.json untracked.

What

  • devRequestHeaders: a same-origin Origin follows Host to the dev server's own origin. Cross-origin is untouched. Applied to HTTP and websockets.
  • Exclude /.codeam/ whole. git never hides a tracked file, so a committed preview.json stays visible.

Tests

remix-app-server + missing-imports-bundle-health: 23 passed, including a live proxy check that the dev server receives the localhost origin. tsc is clean.

🤖 Generated with Claude Code


Run Proof on this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…l of .codeam/

On the owner's codespace (2.76.51) the Remix export rendered and reached its
server, but every icon was a box: the browser fetches Metro's
/assets/?unstable_path=…Feather.ttf with an Origin header, the proxy rewrote
Host to localhost:<port> and kept the public Origin, and Expo's dev middleware
answers a foreign Origin with a 500. A same-origin Origin now follows the Host
to the dev server's own (cross-origin ones untouched), for HTTP and websockets.

.git/info/exclude now lists /.codeam/ whole: git never hides a tracked file, so
a committed .codeam/preview.json stays visible, and the detection cache we
write ourselves is no change of the user's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@edgar-durand
edgar-durand merged commit 54abc29 into main Nov 23, 2026
6 checks 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