Skip to content

feat: use relative URLs for remote deployment#8

Open
chrismdp wants to merge 1 commit intoJamsusMaximus:mainfrom
chrismdp:feat/relative-urls
Open

feat: use relative URLs for remote deployment#8
chrismdp wants to merge 1 commit intoJamsusMaximus:mainfrom
chrismdp:feat/relative-urls

Conversation

@chrismdp
Copy link

@chrismdp chrismdp commented Mar 3, 2026

Summary

  • Replace hardcoded localhost:5174 URLs in client code with window.location-based URLs
  • Affects useFileActivity.ts (WS + API), HabboRoom.tsx (API), MultiFloorHotel.tsx (API)
  • WebSocket URL correctly switches between ws: and wss: based on page protocol

Rationale

Currently the client only works on localhost. This change lets it work behind any reverse proxy (nginx, etc.) on any hostname, which is needed for remote deployment.

Test plan

  • npm run build --workspace=client compiles cleanly
  • Dev mode still works on localhost (URLs resolve to same origin)
  • Behind nginx reverse proxy, API calls and WebSocket connect through the proxy

🤖 Generated with Claude Code

Replace hardcoded localhost:5174 URLs with window.location-based
URLs so the client works when served through a reverse proxy on
any hostname.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant