[#85] Allow to customize secret expiry (#93)

This commit is contained in:
Knut Ahlers 2023-06-26 23:01:06 +02:00 committed by GitHub
parent 62ca7b3900
commit 901c85ca11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 233 additions and 61 deletions

View file

@ -182,10 +182,12 @@ func handleIndex(w http.ResponseWriter, r *http.Request) {
if err := indexTpl.Execute(w, struct {
Customize customize
InlineContentNonce string
MaxSecretExpiry int64
Version string
}{
Customize: cust,
InlineContentNonce: inlineContentNonceStr,
MaxSecretExpiry: cfg.SecretExpiry,
Version: version,
}); err != nil {
http.Error(w, errors.Wrap(err, "executing template").Error(), http.StatusInternalServerError)