ipn/ipnlocal/serve: add grant headers

Updates tailscale/corp/#28372

Signed-off-by: Gesa Stupperich <gesa@tailscale.com>
This commit is contained in:
Gesa Stupperich
2025-10-03 17:52:41 +01:00
committed by Gesa Stupperich
parent f4e2720821
commit 576aacd459
8 changed files with 416 additions and 27 deletions
+9 -3
View File
@@ -891,11 +891,17 @@ func (v HTTPHandlerView) Proxy() string { return v.ж.Proxy }
// plaintext to serve (primarily for testing)
func (v HTTPHandlerView) Text() string { return v.ж.Text }
// peer capabilities to forward in grant header, e.g. example.com/cap/mon
func (v HTTPHandlerView) UserCaps() views.Slice[tailcfg.PeerCapability] {
return views.SliceOf(v.ж.UserCaps)
}
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
var _HTTPHandlerViewNeedsRegeneration = HTTPHandler(struct {
Path string
Proxy string
Text string
Path string
Proxy string
Text string
UserCaps []tailcfg.PeerCapability
}{})
// View returns a read-only view of WebServerConfig.