add app name and version

This commit is contained in:
Jon Lundy 2020-11-23 20:46:46 -07:00
parent 2b0b454063
commit 7d1463296d
2 changed files with 5 additions and 1 deletions

View File

@ -86,6 +86,7 @@ func fmtKey(key promise.Key) string {
func (s *identity) get(w http.ResponseWriter, r *http.Request) {
log := zlog.Ctx(r.Context())
cfg := config.FromContext(r.Context())
id := chi.URLParam(r, "id")
log.Debug().Str("get ", id).Send()
@ -172,6 +173,8 @@ func (s *identity) get(w http.ResponseWriter, r *http.Request) {
})
page := page{Style: defaultStyle}
page.AppName = fmt.Sprintf("%s v%s", cfg.GetString("app-name"), cfg.GetString("app-version"))
// Wait for either entity to resolve or timeout
select {

View File

@ -1,6 +1,7 @@
package keyproofs
type page struct {
AppName string
Entity *Entity
Style *Style
Proofs *Proofs
@ -173,7 +174,7 @@ var pageTPL = `
</div>
<div class="card-footer text-muted text-center">
&copy; 2020 Sour.is | <a href="/id/me@sour.is">About me</a> | <a href="https://github.com/sour-is/keyproofs">GitHub</a> | Inspired by <a href="https://keyoxide.org/">keyoxide</a>
{{.AppName}} | &copy; 2020 Sour.is | <a href="/id/me@sour.is">About me</a> | <a href="https://github.com/sour-is/keyproofs">GitHub</a> | Inspired by <a href="https://keyoxide.org/">keyoxide</a>
</div>
</div>
</div>