fix: dashboard API calls use same-origin instead of hardcoded localhost ports#1024
Open
web3dev1337 wants to merge 1 commit into
Open
fix: dashboard API calls use same-origin instead of hardcoded localhost ports#1024web3dev1337 wants to merge 1 commit into
web3dev1337 wants to merge 1 commit into
Conversation
…st ports
The recovery/startup helpers mapped client port 2080 -> localhost:3000 and
2081 -> localhost:4000, which only resolves on the machine the browser runs
on — from a phone or second PC "localhost" is that device, so the calls
timed out ("please check if server is running on port 3000") and got
CORS-blocked locally too. The client dev server already proxies /api to the
backend, so same-origin works everywhere, remote browsers included.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
2080→localhost:3000/2081→localhost:4000for the recovery-state, windows-startup, and recovery-modal API calls. From any remote browser (phone, second PC) "localhost" is the viewing device, so these calls failed with connection timeouts; locally they were CORS-blocked cross-port anyway./api(and/socket.ioincl. websockets) to the backend, sowindow.location.originworks identically on the laptop and from any device that can reach the client port.Test plan
node --check client/dashboard.jspasses.🤖 Generated with Claude Code