@@ -9,8 +9,10 @@ type Config struct {
99 Port string
1010 SiteName string
1111 IdentitySecret string // optional; auto-generated and stored in DB if empty
12- SDKServiceURL string // URL of Replicated SDK sidecar, e.g. http://localhost:3000
13- LocalDev bool // LOCAL_DEV=true bypasses SDK gates when SDK_SERVICE_URL is unset
12+ SDKServiceURL string // URL of Replicated SDK sidecar, e.g. http://localhost:3000
13+ LocalDev bool // LOCAL_DEV=true bypasses SDK gates when SDK_SERVICE_URL is unset
14+ SiteColor string // default primary color (hex), overridden by DB branding settings
15+ CustomBrandingEnabled bool // set by LicenseFieldValue custom_branding_enabled via KOTS
1416}
1517
1618func Load () Config {
@@ -22,6 +24,10 @@ func Load() Config {
2224 if siteName == "" {
2325 siteName = "GameShelf"
2426 }
27+ siteColor := os .Getenv ("SITE_COLOR" )
28+ if siteColor == "" {
29+ siteColor = "#3B82F6"
30+ }
2531 adminSecret := os .Getenv ("ADMIN_SECRET" )
2632 if adminSecret == "" {
2733 adminSecret = "changeme"
@@ -32,8 +38,10 @@ func Load() Config {
3238 AdminSecret : adminSecret ,
3339 Port : port ,
3440 SiteName : siteName ,
35- IdentitySecret : os .Getenv ("IDENTITY_SECRET" ),
36- SDKServiceURL : os .Getenv ("SDK_SERVICE_URL" ),
37- LocalDev : os .Getenv ("LOCAL_DEV" ) == "true" ,
41+ IdentitySecret : os .Getenv ("IDENTITY_SECRET" ),
42+ SDKServiceURL : os .Getenv ("SDK_SERVICE_URL" ),
43+ LocalDev : os .Getenv ("LOCAL_DEV" ) == "true" ,
44+ SiteColor : siteColor ,
45+ CustomBrandingEnabled : os .Getenv ("CUSTOM_BRANDING_ENABLED" ) == "true" ,
3846 }
3947}
0 commit comments