firebase / firebase/firebase-tools-ui

Static 127.0.0.1 link on Hosting card breaks features relying on same origin

Open
#1,140 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
291
Forks
74
PR merge metrics
No merged PRs in 30d

Description

Note: Before filing bugs in this repo, please ensure that this is a bug for the Emulator Suite UI. Emulator Suite and/or Firebase CLI bugs should be filed under the firebase-tools repo here:
https://github.com/firebase/firebase-tools/issues/new/choose

**Describe the bug**
When running emulators in a container (bound to 0.0.0.0), the Hosting card forces an absolute external link to 127.0.0.1:[port]. If a developer accesses the dashboard via a different hostname (e.g., localhost), this mismatched origin breaks features relying on the same origin.

**To Reproduce**
Steps to reproduce the behavior:

1. Run Firebase Emulator Suite inside a container bound to 0.0.0.0.
2. Open the Emulator UI dashboard in your browser via http://localhost:4000.
3. Click on the "View Website" button on the Hosting card.
4. Notice that it redirects to http://127.0.0.1:5000 instead of the UI dashboard's hostname.

**Expected behavior**
The Hosting external link should dynamically adapt to the UI dashboard's hostname to maintain origin consistency.

**Screenshots**
N/A

**Desktop (please complete the following information):**

- OS: Debian GNU/Linux
- Browser: Chromium
- Version: Latest

**Smartphone (please complete the following information):**

N/A

**Additional context**
I have a localized fix ready for this and will submit a Pull Request shortly.

Contributor guide

Open the contributing guide

Research direction

Start at the Emulator Suite UI Hosting card implementation and reproduce the redirect from a dashboard opened at localhost:4000 while the emulator is bound to 0.0.0.0. The change is complete when the View Website link preserves the dashboard hostname instead of forcing 127.0.0.1, and the container scenario no longer breaks same-origin features.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.