hello team :wave: i’m trying to get setup with se...
# ask-questions
q
hello team 👋 i’m trying to get setup with self hosted growthbook on kubernetes. im running into CORS issues during
/auth/firsttime
request from growthbook web to growthbook api. i’ve set the appropriate env vars such as
APP_ORIGIN
to the backend api server and
API_HOST
to frontend service. my ingresses (traefik) are using oauth but im still getting blocked on the username / password auth form page.
f
What error are you seeing exactly? Typically if there are CORS issues, you wouldn't even be able to see the auth form at all
q
Copy code
Access to fetch at '<https://growthbook-api>.<DOMAIN>/auth/firsttime' from origin '<https://growthbook-ui>.<DOMAIN>' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
f
Hmm. I don't think GrowthBook does any redirects from the API side. Is that coming from somewhere else like traefik?
q
it is possible that using traefik ingress for
growthbook-api
is hitting google oauth redirect which is being blocked by CORS for ui -> api requests
is there a recommended way to support https traffic? do the servers support https traffic over port 443?
f
Self-hosted GrowthBook does not use Google OAuth for logging in. It stores users locally within MongoDB. So there's no redirect happening at all on the GrowthBook side. As far as https, the containers themselves only support http, so you would need to do SSL termination at the proxy or load balancer level
From your error, it looks like the OPTIONS request is returning a 301 redirect (or similar). Can you see where it's trying to redirect to? That might give a clue as to where it's coming from
q
yup, this was due to traefik triggering oauth redirect