FDN-02/FDN-03/FDN-07/FDN-08: Migrations-Rollback, Objekt-Storage-Interface, go.sum-Fix, Observability
CI / Backend (go vet, go test -cover) (push) Has been cancelled
CI / Frontend (ESLint, tsc, next build) (push) Has been cancelled

- FDN-02: Rollback-fähige Down-Migrationen (024-026), archivdms seed dev CLI
- FDN-03: internal/objectstore Interface + lokaler WORM-Treiber, signierte Download-URLs
- FDN-07: go.mod/go.sum vervollständigt (fehlender go-ldap/v3-Eintrag), CI-Pipeline (.gitea/workflows/ci.yml, bereits in FDN-01 committet) damit lauffähig
- FDN-08: Request-ID-Middleware, /metrics-Endpoint, Panic-Recovery, Login/Logout/Me technisches Logging inkl. Access-Log je Anfrage
This commit is contained in:
2026-08-11 22:27:52 +02:00
parent 9a24ea29e1
commit 89de794356
30 changed files with 2688 additions and 113 deletions
+16
View File
@@ -25,6 +25,10 @@ type APIConfig struct {
// TrustedProxies is a list of IP addresses or CIDR ranges whose
// X-Forwarded-For header is trusted. Empty = trust no proxy.
TrustedProxies []string `yaml:"trusted_proxies"`
// MetricsAllowedIPs sind zusätzliche Quell-IPs oder CIDR-Bereiche, die den
// unauthentifizierten Prometheus-Endpunkt GET /metrics scrapen dürfen
// (FDN-08). Loopback ist immer erlaubt, alles andere per Default gesperrt.
MetricsAllowedIPs []string `yaml:"metrics_allowed_ips"`
}
// ServerConfig holds general server settings.
@@ -101,6 +105,18 @@ type StorageConfig struct {
RetentionDays int `yaml:"retention_days"`
// MaxUploadSizeMB caps the accepted multipart upload size. 0 = default 50.
MaxUploadSizeMB int `yaml:"max_upload_size_mb"`
// SignedURLTTLMinutes is the default validity of signed download URLs
// (internal/objectstore). 0 = default 15 minutes.
SignedURLTTLMinutes int `yaml:"signed_url_ttl_minutes"`
}
// ResolvedSignedURLTTL returns the configured signed-download-URL validity,
// falling back to 15 minutes when unset (<= 0).
func (s StorageConfig) ResolvedSignedURLTTL() time.Duration {
if s.SignedURLTTLMinutes <= 0 {
return 15 * time.Minute
}
return time.Duration(s.SignedURLTTLMinutes) * time.Minute
}
// InboxPath returns the directory raw uploads are written to before hashing