MCPcopy Index your code
hub / github.com/tailscale/tailscale / ServeHTTP

Method ServeHTTP

tsnet/tsnet.go:515–522  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

513}
514
515func (h *localSecHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
516 if r.Header.Get("Sec-Tailscale") != "localapi" {
517 w.WriteHeader(403)
518 io.WriteString(w, "missing 'Sec-Tailscale: localapi' header")
519 return
520 }
521 h.h.ServeHTTP(w, r)
522}
523
524// Start connects the server to the tailnet.
525// Optional: any calls to Dial/Listen will also call Start.

Calls 3

WriteStringMethod · 0.80
GetMethod · 0.65
WriteHeaderMethod · 0.45