Skip to content

fix(hoppscotch): auto generated whitelist app origin not formatted correctly #38

@jonathanfoster

Description

@jonathanfoster

What Happened

I installed hoppscotch-0.1.0 and the Hoppscotch Desktop app was unable to connect to this instance. The issue is caused by a bug in the logic for auto generating whitelist origins. The whitelisted origin for the desktop app was app://hoppscotch.example.com and the actual desktop app origin is app://hoppscotch_example_com.

Expected Behavior

The Hoppscotch Desktop app should be able to connect to a hoppscotch-0.1.0 instance without additional configuration. The auto generated app whitelist origin must replace . with _ when formatting the desktop app origin.

Steps to Reproduce

  1. Install hoppscotch-0.1.0:

    helm install hoppscotch charts/hoppscotch -n default --values=charts/hoppscotch/ci/default-values.yaml --create-namespace --wait 
  2. Verify incorrect desktop app origin (i.e., app://hoppscotch.local instead of app://hoppscotch_local):

    $ kubectl get configmap hoppscotch -o yaml | grep WHITELISTED_ORIGINS
      WHITELISTED_ORIGINS: https://hoppscotch.local,app://hoppscotch.local
  3. Start desktop app and attempt to add hoppscotch-0.1.0 instance

Temporary Workaround

You can specify the whitelisted origins explicitly to workaround this bug.

hoppscotch:
  backend:
    whitelistedOrigins:
      - https://hoppscotch.local
      - app://hoppscotch_local

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