mirror of
https://codeberg.org/mycelium/emojiquest.git
synced 2024-11-17 06:33:17 +00:00
get username from the proxy header
This commit is contained in:
parent
77d2e2caa5
commit
1ab0a78951
3
main.go
3
main.go
|
@ -42,7 +42,8 @@ func handleForm(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
now := time.Now().UTC().Format(time.RFC3339)
|
now := time.Now().UTC().Format(time.RFC3339)
|
||||||
entry := strings.Join([]string{now, "unknown", details.Label, details.Url}, ",")
|
username := r.Header.Get("X-Forwarded-Preferred-Username")
|
||||||
|
entry := strings.Join([]string{now, username, details.Label, details.Url}, ",")
|
||||||
insertEntry(entry)
|
insertEntry(entry)
|
||||||
|
|
||||||
tmpl.Execute(w, struct{ Success bool }{true})
|
tmpl.Execute(w, struct{ Success bool }{true})
|
||||||
|
|
Loading…
Reference in a new issue