update
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
_ "time/tzdata"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
@@ -28,6 +29,7 @@ type Config struct {
|
||||
MaxHostLimit int
|
||||
MaxUploadBytes int64
|
||||
TrustProxyHeaders bool
|
||||
DisplayTimeZone *time.Location
|
||||
}
|
||||
|
||||
func LoadConfig() (Config, error) {
|
||||
@@ -82,6 +84,12 @@ func LoadConfig() (Config, error) {
|
||||
if err != nil {
|
||||
return cfg, fmt.Errorf("TAPM_TRUST_PROXY_HEADERS: %w", err)
|
||||
}
|
||||
cfg.DisplayTimeZone, err = time.LoadLocation(
|
||||
envDefault("TAPM_DISPLAY_TIME_ZONE", "America/Chicago"),
|
||||
)
|
||||
if err != nil {
|
||||
return cfg, fmt.Errorf("TAPM_DISPLAY_TIME_ZONE: %w", err)
|
||||
}
|
||||
|
||||
cfg.AllowedGiteaUsers = make(map[string]struct{})
|
||||
for _, user := range strings.Split(
|
||||
|
||||
Reference in New Issue
Block a user