Allow passing headers/user-agent for proxy requests
biku opened this issue · comments
Victor Kolosov commented
Summary
Proxy to API check in Web UI fails
Expected Behavior
pressing re-check should change to green and show "connected"
Current Behavior
It does not work in our self hosted setup, which runs on AWS in kubernetes. The default WAF requires an user-agent be passed, otherwise we get
{
"status": 200,
"result": {
"status": 403,
"body": "<html>\r\n<head><title>403 Forbidden</title></head>\r\n<body>\r\n<center><h1>403 Forbidden</h1></center>\r\n</body>\r\n</html>\r\n",
"error": "Proxy healthcheck returned a non-successful status code",
"version": "",
"url": "https://our-proxy-url/healthcheck"
}
}
It probably can be done globally to have a user-agent header always be included in all requests.
For this particular problem we found that inserting
headers: { "user-agent": "growthbook" }
here works