Skip to content

[BUG] Displayed endpoint URL doesn't reflect WebSocket settings #57

@BenGWeeks

Description

@BenGWeeks

Problem

The endpoint URL shown on the page is always the public URL:

wss://{host}/nostrclient/api/v1/relay

However, if only "Expose Private Websocket" is enabled (and "Expose Public Websocket" is disabled), this URL returns a 403 error. This is confusing for users who copy the displayed URL expecting it to work.

Current Behavior

  • Page always displays /api/v1/relay (public endpoint)
  • If public_ws is disabled, this URL doesn't work
  • Users have no way to see the private endpoint URL
  • No indication of which endpoints are enabled/disabled

Expected Behavior

The page should display the correct endpoint(s) based on settings:

  1. Show both endpoints with their status:

    • Public endpoint: wss://{host}/nostrclient/api/v1/relay - Enabled / Disabled
    • Private endpoint: wss://{host}/nostrclient/api/v1/{encrypted_id} - Enabled / Disabled
  2. Visual indicators:

    • Green badge or checkmark for enabled endpoints
    • Red badge or X for disabled endpoints
    • Copy button only shown for enabled endpoints
  3. Neither enabled: Show a warning that no endpoints are available

Additional Context

The private endpoint uses an encrypted path that acts as a secret URL for external clients. This URL should be exposed to admins so they can share it with authorized clients.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions