MCPcopy Index your code
hub / github.com/coder/coder / isReplicaRelayRequest

Function isReplicaRelayRequest

cli/server.go:2554–2556  ·  view source on GitHub ↗

isReplicaRelayRequest returns true when the request was sent by another coderd replica as part of cross-replica streaming. The enterprise chat relay sets X-Coder-Relay-Source-Replica on every request to identify itself.

(r *http.Request)

Source from the content-addressed store, hash-verified

2552// enterprise chat relay sets X-Coder-Relay-Source-Replica on every
2553// request to identify itself.
2554func isReplicaRelayRequest(r *http.Request) bool {
2555 return r.Header.Get("X-Coder-Relay-Source-Replica") != ""
2556}
2557
2558// IsLocalhost returns true if the host points to the local machine. Intended to
2559// be called with `u.Hostname()`.

Callers 2

redirectToAccessURLFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by 1