https://www.growthbook.io/ logo
#announcements
Title
# announcements
l

loud-hydrogen-50191

02/28/2023, 4:11 AM
Hi folks, i'm with
Build: 65b023b (2022-11-10)
• I've setup custom domains on
app_origin
443 and
api_host
8443 via env vars, • And accessing both the app ui and the features sdk endpoint urls works well • But when i try accessing the https api_host 8443 directly, i can see the json still contains
"api_host":"<http://subdomain.mydomain.com:3100>"
eventhough i've setup api_host with 8443 Wondering whether this could cause issues ?
f

fresh-football-47124

02/28/2023, 4:12 AM
Hi Albert
can you share the dockercompose file?
l

loud-hydrogen-50191

02/28/2023, 4:16 AM
Hi @fresh-football-47124! Appreciate for the fast reply. Here's the excerpt from Dockerfile
Copy code
FROM growthbook/growthbook:latest
and the excerpt from terraform file
Copy code
{
        "name": "APP_ORIGIN",
        "value": "https://${var.growthbook_domain}"
      },
      {
        "name": "API_HOST",
        "value": "https://${var.growthbook_domain}:${aws_alb_listener.gb-api-listener.port}"
      },
where the port is 8443 for the API_HOST Pretty sure of the correct value because we could access the API_HOST url with 8443 and not with 3100
f

fresh-football-47124

02/28/2023, 4:26 AM
I assume it’s giving you a ‘failed to fetch’ error?
l

loud-hydrogen-50191

02/28/2023, 4:31 AM
no, in fact everything works great .. it's just showing the api_host with 3100 port, and not 8443 in the json response when accessing the https://my.custom.domain:8443
f

fresh-football-47124

02/28/2023, 4:33 AM
oh, let me see if that’s just an issue with the debug message
glad it’s working
though your version is a bit old
1
ya, it’s fine
it’s using the internal port
l

loud-hydrogen-50191

02/28/2023, 4:35 AM
strange that we got the old version from
:latest
, i will check the ecr .. thanks for reminding
f

fresh-football-47124

02/28/2023, 4:35 AM
Copy code
api_host: req.protocol + "://" + req.hostname + ":" + app.get("port"),
    app_origin: APP_ORIGIN,
l

loud-hydrogen-50191

02/28/2023, 4:36 AM
Ah, ok2 .. please cmiiw that the json response is correct, that it should not be using 8443 as per defined in the env variable, but rather 3100 which is internally used
f

fresh-football-47124

02/28/2023, 4:37 AM
correct
l

loud-hydrogen-50191

02/28/2023, 5:46 AM
Thank you for the help @fresh-football-47124 🙌
18 Views