Fix expires label

This commit is contained in:
2026-09-13 09:14:27 +02:00
parent b24467c37d
commit ad611e9652
3 changed files with 12 additions and 7 deletions
+9 -4
View File
@@ -48,10 +48,14 @@ type indexPage struct {
MaxSize string
MaxExpiry string
DefaultExpiry string
AbsBase string
AllowVanity bool
MaxSizeBytes int64 // 0 when unlimited; the script checks against it
Stale bool // a login whose token no longer exists
// ExpiryHint is the same lifetime as DefaultExpiry, worded for the form's
// "Expires in" field rather than for a row in the limits list: what the
// field wants is "never", what the list wants is "unlimited".
ExpiryHint string
AbsBase string
AllowVanity bool
MaxSizeBytes int64 // 0 when unlimited; the script checks against it
Stale bool // a login whose token no longer exists
}
func (s *Server) handleIndex(w http.ResponseWriter, r *http.Request) {
@@ -71,6 +75,7 @@ func (s *Server) handleIndex(w http.ResponseWriter, r *http.Request) {
MaxSize: config.FormatSize(lim.MaxSize),
MaxExpiry: config.FormatLifetime(lim.MaxExpiry),
DefaultExpiry: config.FormatLifetime(lim.DefaultExpiry),
ExpiryHint: config.FormatDuration(lim.DefaultExpiry),
AbsBase: s.absBase(r),
AllowVanity: lim.AllowVanity,
MaxSizeBytes: lim.MaxSize,