this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

updates from review

+2 -2
+2 -2
cmd/relay/forward.go
··· 73 73 } 74 74 75 75 // add Via header (critical to prevent forwarding loops) 76 - upstreamReq.Header.Add("Via", s.relay.Config.UserAgent) 76 + upstreamReq.Header.Add("Via", req.Proto+" atproto-relay") 77 77 78 78 upstreamResp, err := client.Do(upstreamReq) 79 79 if err != nil { 80 80 s.logger.Warn("forwarded admin HTTP request failed", "method", req.Method, "sibling", hostname, "url", u.String(), "err", err) 81 81 continue 82 82 } 83 - if upstreamResp.StatusCode != http.StatusOK { 83 + if !(upstreamResp.StatusCode >= 200 && upstreamResp.StatusCode < 300) { 84 84 respBytes, _ := io.ReadAll(upstreamResp.Body) 85 85 s.logger.Warn("forwarded admin HTTP request failed", "method", req.Method, "sibling", hostname, "url", u.String(), "statusCode", upstreamResp.StatusCode, "body", string(respBytes)) 86 86 continue