COOKIE_ syntax doesn't work with cookie names containing hyphens

  1. My goal: Use the COOKIE_ substitution syntax to automatically pass a browser cookie value into the Authorization header of a REST API request. The cookie name is mycookie-staging and needs to be sent as Authorization: Basic <cookie_value>.
  2. Issue: The COOKIE_mycookie-staging syntax is not being substituted with the actual cookie value. When I use Authorization: Basic COOKIE_mycookie-staging in the Headers section, the request fails with a 401 Unauthorized error. However, when I manually paste the cookie value instead of using COOKIE_, the request succeeds.
  3. What works:
    • Cookie without hyphen: mycookie → COOKIE_mycookie

    • Manual value: Authorization: Basic xxx

    • Same curl request with the cookie works perfectly

    1. What doesn't work:
    • COOKIE_mycookie-staging

    • COOKIE_mycookie_staging

  4. Retool version & hosting setup: Self-hosted v3.300.4-stable on K8s