mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-06-13 09:33:34 +02:00
Special case to extract email when using Google IAP as authenticating proxy
This commit is contained in:
@@ -339,6 +339,10 @@ func (s *Server) userFromHeader(handler http.Handler) http.Handler {
|
||||
user = "anonymous"
|
||||
}
|
||||
|
||||
if *authUserHeader == "X-Goog-Authenticated-User-Email" {
|
||||
user = strings.TrimPrefix(user, "accounts.google.com:")
|
||||
}
|
||||
|
||||
cookie := http.Cookie{
|
||||
Name: "wguser",
|
||||
Value: user,
|
||||
|
||||
Reference in New Issue
Block a user