hello team :wave: i’m trying to get setup with se...
# ask-questions
hello team 👋 i’m trying to get setup with self hosted growthbook on kubernetes. im running into CORS issues during
request from growthbook web to growthbook api. i’ve set the appropriate env vars such as
to the backend api server and
to frontend service. my ingresses (traefik) are using oauth but im still getting blocked on the username / password auth form page.
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
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.
Hmm. I don't think GrowthBook does any redirects from the API side. Is that coming from somewhere else like traefik?
it is possible that using traefik ingress for
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?
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
yup, this was due to traefik triggering oauth redirect