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

incalculable-truck-50992

08/02/2023, 8:24 AM
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

fresh-football-47124

08/02/2023, 8:26 AM
what url are you hitting to get the json response?
i

incalculable-truck-50992

08/02/2023, 8:27 AM
I have hosted Growthbook in my own Azure Cloud environment and the GET API i'm calling is : /api/features/
f

fresh-football-47124

08/02/2023, 4:57 PM
@happy-autumn-40938 do you know?
h

happy-autumn-40938

08/02/2023, 5:05 PM
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

incalculable-truck-50992

08/02/2023, 6:29 PM
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

happy-autumn-40938

08/02/2023, 6:43 PM
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

incalculable-truck-50992

08/02/2023, 8:47 PM
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

happy-autumn-40938

08/02/2023, 9:46 PM
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?
8 Views