Hi Team, I have an issue with Growthbook proxy API...
# announcements
i
Hi Team, I have an issue with Growthbook proxy API. Whenever i call the GET API for proxy from my web browser, i gets the JSON response but URL redirection happens and the browser url is changed to Growthbook API url. Does anyone know why this is happening? And the response returned is coming from proxy cache or the backend? Thanks.
f
what url are you hitting to get the json response?
i
I have hosted Growthbook in my own Azure Cloud environment and the GET API i'm calling is : /api/features/
f
@happy-autumn-40938 do you know?
h
There isn't any redirection logic built into the proxy, so I suspect it's happening somewhere else. Do you mind sharing the full URL for both your proxy endpoint and your GB server (feel free to obfuscate the specific domain)? Are you able to see the request/response calls in Chrome and able to see that a 3xx redirection is happening from a specific call?
i
Hi Bryce
Please see if this Chrome network tab screenshot helps
So API call is made to the proxy url, which results into http 301 status and then redirection to GB server happens and i get the response along with 200.
h
I don't think there's enough information here in the screenshots to reveal an obvious issue. I don't know what would cause the 301, but I doubt it's the proxy server. My guess would be something in your DNS routing or anything else in your infra that routes/proxies requests. Load balancer rules? CDN rules?
if you have access logs or traffic metrics on the proxy instance, it might be able to tell us if it's even getting traffic, or something else is intercepting first
i
Thanks Bryce. DNS/CDN routing is ruled out. I'm hitting the proxy url from web browser. When this url is hit, it returns 301 along with the backend API url in http response headers and then browser connects to this backend url and i get 200 with desired response. I'm suspecting that anything in my GB configuration setup is doing this but not sure.
h
As a quick test, let's see if all proxy routes are 301'ing or just features. Could you try visiting this link and reporting what happens? http://proxy.yourdomain/healthcheck
also, were you able to check any access logs for the proxy cluster?