diff --git a/config.yml.sample b/config.yml.sample index 2471c29287..ffb47ae4f1 100644 --- a/config.yml.sample +++ b/config.yml.sample @@ -60,6 +60,8 @@ service: demomode: false # Allow changing the logo and other icons based on various occasions throughout the year. allowiconchanges: true + # Allow using a custom logo via external URL. + customlogourl: '' sentry: # If set to true, enables anonymous error tracking of api errors via Sentry. This allows us to gather more diff --git a/frontend/index.html b/frontend/index.html index 6833a9a800..5619b2f996 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -23,8 +23,6 @@ // It has to be the full url, including the last /api/v1 part and port. // You can change this if your api is not reachable on the same port as the frontend. window.API_URL = 'http://localhost:3456/api/v1' - // Allow using a custom logo via external URL. - window.CUSTOM_LOGO_URL = '' diff --git a/pkg/config/config.go b/pkg/config/config.go index cd65de264e..096bf51877 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -63,6 +63,7 @@ const ( ServiceEnableUserDeletion Key = `service.enableuserdeletion` ServiceMaxAvatarSize Key = `service.maxavatarsize` ServiceAllowIconChanges Key = `service.allowiconchanges` + ServiceCustomLogoURL Key = `service.customlogourl` SentryEnabled Key = `sentry.enabled` SentryDsn Key = `sentry.dsn` diff --git a/pkg/routes/static.go b/pkg/routes/static.go index 9d0797dfe5..082890a736 100644 --- a/pkg/routes/static.go +++ b/pkg/routes/static.go @@ -79,7 +79,7 @@ func serveIndexFile(c echo.Context, assetFs http.FileSystem) (err error) { if config.ServiceAllowIconChanges.GetBool() { data["ALLOW_ICON_CHANGES"] = "true" } - data["CUSTOM_LOGO_URL"] = "" // TODO + data["CUSTOM_LOGO_URL"] = config.ServiceCustomLogoURL.GetString() err = tmpl.Execute(&tplOutput, data) if err != nil {