chore: checkpoint assessment and inbox integration

This commit is contained in:
TakuyaYagam1 committed 2026-10-08 17:47:30 +03:00
1 parent 88a31ba0d5
commit 5c52fd8b91
31 files changed
+4608 -181

No files matched your search

+14 -4
View File
@@ -143,6 +143,9 @@ type Config struct {
// IdentitySessionAbsoluteLifetime is the maximum lifetime of a session,
// even when it remains active.
IdentitySessionAbsoluteLifetime time.Duration
// AssessmentDemoCategoriesEnabled explicitly enables synthetic demo category
// assignment. Reviewed source provenance is required separately.
AssessmentDemoCategoriesEnabled bool
// TrustedProxyCIDRs are the reverse proxies in front of the API. The
// client address is taken from X-Forwarded-For only through them (see
@@ -197,10 +200,7 @@ func LoadFromEnv(lookup LookupEnv) (Config, error) {
if err := config.loadPasswordHash(lookup); err != nil {
return Config{}, err
}
if err := config.loadIdentity(lookup); err != nil {
return Config{}, err
}
if err := config.loadTrustedProxies(lookup); err != nil {
if err := config.loadIdentityAndProxySettings(lookup); err != nil {
return Config{}, err
}
@@ -231,6 +231,16 @@ func LoadFromEnv(lookup LookupEnv) (Config, error) {
return config, nil
}
func (config *Config) loadIdentityAndProxySettings(lookup LookupEnv) error {
if err := config.loadIdentity(lookup); err != nil {
return err
}
if err := config.loadAssessment(lookup); err != nil {
return err
}
return config.loadTrustedProxies(lookup)
}
func (config Config) Validate() error {
if err := config.ValidateSeaweedFS(); err != nil {
return err