Merge branch 'nb-respond-with-node-id' into custom

pull/747/head
Neeraj Kashyap 2023-01-11 16:51:11 -08:00
commit bfffc77be7
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -56,6 +56,8 @@ func lbHandler(w http.ResponseWriter, r *http.Request) {
// Save origin path, to use in proxyErrorHandler if node will not response
r.Header.Add("X-Origin-Path", r.URL.Path)
w.Header().Add("X-Node-URL", node.Endpoint.String())
switch {
case strings.HasPrefix(r.URL.Path, fmt.Sprintf("/nb/%s/jsonrpc", blockchain)):
lbJSONRPCHandler(w, r, blockchain, currentClientAccess)