Skip to content

Commit 09fbd64

Browse files
committed
auth: remove replit comment, always include tailscale_tags in metadata
Include an empty tailscale_tags entry for non-tagged users so that Caddy expressions can compare against the field unconditionally without needing to handle the missing-key case. Signed-off-by: Ryan Mulligan <[email protected]>
1 parent 6ec2516 commit 09fbd64

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

auth.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
// Copyright (c) Tailscale Inc & contributors
22
// SPDX-License-Identifier: Apache-2.0
33

4-
// Patched by Replit to support tagged nodes in tailscale_auth.
5-
// Upstream rejects all tagged nodes; this version exposes tags as metadata
6-
// so Caddy expressions can match on {http.auth.user.tailscale_tags}.
7-
84
package tscaddy
95

106
// auth.go contains the TailscaleAuth module and supporting logic.
@@ -177,6 +173,7 @@ func (ta Auth) Authenticate(w http.ResponseWriter, r *http.Request) (caddyauth.U
177173
"tailscale_name": info.UserProfile.DisplayName,
178174
"tailscale_profile_picture": info.UserProfile.ProfilePicURL,
179175
"tailscale_tailnet": tailnet,
176+
"tailscale_tags": "",
180177
}
181178
}
182179

0 commit comments

Comments
 (0)