Skip to content

API always populate window.API_URL with http despite MONOCLE_PUBLIC_URL set to HTTPS. #1167

@kaovilai

Description

@kaovilai
❯ oc exec deploy/crawler curl "$MONOCLE_PUBLIC_URL"
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <link rel="stylesheet" href="/dist/bundle.css">
  <link rel="icon" href="/favicon.ico" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta name="theme-color" content="#000000" />
  <script>
    window.API_URL = "http://$BASEDOMAIN";
    window.document.title = "Monocle";
  </script>
</head>

<body>
  <noscript>You need to enable JavaScript to run this app.</noscript>
  <div id="root"></div>
  <script src="/dist/bundle.js"></script>
</body>

</html>

~/git/monocle remotes/upstream/HEAD*
❯ oc get deploy/api -oyaml | grep --after=1 PUBLIC_URL
        - name: MONOCLE_PUBLIC_URL
          value: https://$BASEDOMAIN

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