feature/featuretags: make clientmetrics optional
Saves 57 KB Updates #12614 Change-Id: If7eebec12b3cb30ae6264171d36a258c04b05a70 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
127a967207
commit
3ae7a351b4
@@ -1218,6 +1218,11 @@ func (h *Handler) serveHandlePushMessage(w http.ResponseWriter, r *http.Request)
|
||||
}
|
||||
|
||||
func (h *Handler) serveUploadClientMetrics(w http.ResponseWriter, r *http.Request) {
|
||||
if !buildfeatures.HasClientMetrics {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(struct{}{})
|
||||
return
|
||||
}
|
||||
if r.Method != httpm.POST {
|
||||
http.Error(w, "unsupported method", http.StatusMethodNotAllowed)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user