Skip to content

Make REACT_APP_CMF_API_URL optional — default to browser origin for HTTP/HTTPS agnostics build #372

Description

@atripathy86

REACT_APP_CMF_API_URL in .env requires an absolute URL (e.g. http://host:80 or https://host:443), so the user must choose HTTP or HTTPS upfront. If they open the UI over a different scheme than the one configured, the browser blocks API calls as mixed content and the UI shows "Server connection refused".

This forced choice is unnecessary when the UI and API are served from the same nginx origin (the default deployment) — the browser already knows the correct origin.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions