beyondcode / beyondcode/herd-community

[Bug]: Reverb Dashboard fails on localhost when SSL is enabled due to hardcoded host

Open
#1,602 0 comments 0 reactions 0 assignees View on GitHub
macOS
Dominant language
No language data
Stars
122
Forks
1
PR merge metrics
No merged PRs in 30d

Description

### Platform

macOS

### Operating system version

MacOS 15.7.2

### System architecture

ARM64 (M1, M2, etc)

### Herd Version

1.24.2

### PHP Version

8.4

### Bug description

I ran into an issue where the Reverb Dashboard would not connect on localhost when SSL was enabled.

This appears to be related to (or the same root cause as)
https://github.com/laravel/reverb/issues/350

### Steps to reproduce

Environment

Initial environment configuration:

```
REVERB_APP_ID=1001
REVERB_APP_KEY=laravel-herd
REVERB_APP_SECRET=secret
REVERB_HOST="0.0.0.0"
REVERB_PORT=8080
REVERB_SCHEME=https

```

Later updated to:

```
REVERB_APP_ID=1001
REVERB_APP_KEY=laravel-herd
REVERB_APP_SECRET=secret
REVERB_HOST="reverb.herd.test"
REVERB_PORT=443
REVERB_SCHEME=https
```

**What was happening**

The Dashboard was failing to connect because the host inside websocket-status.tsx was hardcoded to 127.0.0.1. When SSL is enabled, this causes the Dashboard to ignore the configured REVERB_HOST, leading to connection failures on localhost and custom domains.

**Fix**

Updating the reverbApps configuration to use the environment variable instead of the hardcoded value resolved the issue.

```
const reverbApps = [
{
id: import.meta.env.VITE_REVERB_APP_ID,
name: "Main Application",
key: import.meta.env.VITE_REVERB_APP_KEY,
**host: import.meta.env.VITE_REVERB_HOST,**
port: import.meta.env.VITE_REVERB_PORT,
forceTLS: (import.meta.env.VITE_REVERB_SCHEME ?? 'https') === 'https',
},
]

```

After making this change and running:

`bun run build
`

the Reverb Dashboard connected properly without any issues.

Expected behavior

The Dashboard should respect VITE_REVERB_HOST instead of relying on a hardcoded 127.0.0.1, especially when SSL is enabled.

Hope this helps

### Relevant log output

```shell

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.