go/twitterchiver/viewer: fix authR
This commit is contained in:
parent
66bfd9a458
commit
12e595bf43
1 changed files with 4 additions and 2 deletions
|
@ -154,8 +154,10 @@ func main() {
|
|||
log.Fatalf("pomerium.New: %v", err)
|
||||
}
|
||||
authR.Use(pomerium.AddIdentityToRequest(v))
|
||||
log.Println("configured pomerium middleware")
|
||||
} else {
|
||||
authR = r
|
||||
}
|
||||
authR = r
|
||||
|
||||
userFromContext := func(ctx context.Context) (string, error) {
|
||||
if *localDisableAuth != "" {
|
||||
|
@ -165,7 +167,7 @@ func main() {
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return identity.User, nil
|
||||
return identity.Email, nil
|
||||
}
|
||||
|
||||
writeError := func(rw http.ResponseWriter, status int, wrap string, err error) {
|
||||
|
|
Loading…
Reference in a new issue