Skip to content

Hardcoded backend URL in short-link form breaks non-production environments #75

Description

@ianujvarshney

File: frontend/components/ui/ShortURL.jsx (line 13)

Title

Make the short-link API URL configurable

Issue description

The short-link form posts directly to a hardcoded DigitalOcean backend URL and also builds the returned short URL with that same host. This makes the frontend difficult to run locally or point at staging and can silently break if the backend domain changes.

Expected

  • Read API base URL from environment variables
  • Use the same configurable base for both request and generated short URL
  • Show user-friendly loading and error states

Acceptance criteria

  • The form works in local, staging, and production environments
  • No backend host is hardcoded in the component
  • Failed requests display a visible error

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions