mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 06:12:20 +08:00
Instrumentation: Proxy status code correction and various improvements (#47473)
For a proxied request, e.g. Grafana's datasource or plugin proxy: If the request is cancelled, e.g. from the browser, the HTTP status code is now 499 Client closed request instead of 502 Bad gateway. If the request times out, e.g. takes longer time than allowed, the HTTP status code is now 504 Gateway timeout instead of 502 Bad gateway. This also means that request metrics and logs will get their status codes adjusted according to above. Fixes #46337 Fixes #46338
This commit is contained in:

committed by
GitHub

parent
c0104db72d
commit
4bc582570e
@ -456,8 +456,6 @@ func TestDataSourceProxy_routeRule(t *testing.T) {
|
||||
|
||||
assert.Equal(t, "http://host/root/path/to/folder/", req.URL.String())
|
||||
|
||||
assert.Empty(t, req.Header.Get("Origin"))
|
||||
assert.Empty(t, req.Header.Get("Referer"))
|
||||
assert.Equal(t, "stillthere", req.Header.Get("X-Canary"))
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user