diff options
author | Vladimir Shushlin <v.shushlin@gmail.com> | 2022-02-22 12:42:43 +0300 |
---|---|---|
committer | Vladimir Shushlin <v.shushlin@gmail.com> | 2022-02-22 13:02:58 +0300 |
commit | dec4b09ac1f6fdf98487d4db61055c1e64358c15 (patch) | |
tree | 27b23651249094f96157d247353be08629f04e27 /internal/config | |
parent | 58581c5a2ff3e95e1dc3acc69913412477a37557 (diff) |
refactor: review fixes
Diffstat (limited to 'internal/config')
-rw-r--r-- | internal/config/config.go | 76 |
1 files changed, 42 insertions, 34 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 2e31612a..24a811ec 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -277,40 +277,48 @@ func loadConfig() (*Config, error) { func LogConfig(config *Config) { log.WithFields(log.Fields{ - "artifacts-server": *artifactsServer, - "artifacts-server-timeout": *artifactsServerTimeout, - "default-config-filename": flag.DefaultConfigFlagname, - "disable-cross-origin-requests": *disableCrossOriginRequests, - "domain": config.General.Domain, - "insecure-ciphers": config.General.InsecureCiphers, - "listen-http": listenHTTP, - "listen-https": listenHTTPS, - "listen-proxy": listenProxy, - "listen-https-proxyv2": listenHTTPSProxyv2, - "log-format": *logFormat, - "metrics-address": *metricsAddress, - "pages-domain": *pagesDomain, - "pages-root": *pagesRoot, - "pages-status": *pagesStatus, - "propagate-correlation-id": *propagateCorrelationID, - "redirect-http": config.General.RedirectHTTP, - "root-cert": *pagesRootKey, - "root-key": *pagesRootCert, - "status_path": config.General.StatusPath, - "tls-min-version": *tlsMinVersion, - "tls-max-version": *tlsMaxVersion, - "gitlab-server": config.GitLab.PublicServer, - "internal-gitlab-server": config.GitLab.InternalServer, - "api-secret-key": *gitLabAPISecretKey, - "enable-disk": config.GitLab.EnableDisk, - "auth-redirect-uri": config.Authentication.RedirectURI, - "auth-scope": config.Authentication.Scope, - "max-conns": config.General.MaxConns, - "max-uri-length": config.General.MaxURILength, - "zip-cache-expiration": config.Zip.ExpirationInterval, - "zip-cache-cleanup": config.Zip.CleanupInterval, - "zip-cache-refresh": config.Zip.RefreshInterval, - "zip-open-timeout": config.Zip.OpenTimeout, + "artifacts-server": *artifactsServer, + "artifacts-server-timeout": *artifactsServerTimeout, + "default-config-filename": flag.DefaultConfigFlagname, + "disable-cross-origin-requests": *disableCrossOriginRequests, + "domain": config.General.Domain, + "insecure-ciphers": config.General.InsecureCiphers, + "listen-http": listenHTTP, + "listen-https": listenHTTPS, + "listen-proxy": listenProxy, + "listen-https-proxyv2": listenHTTPSProxyv2, + "log-format": *logFormat, + "metrics-address": *metricsAddress, + "pages-domain": *pagesDomain, + "pages-root": *pagesRoot, + "pages-status": *pagesStatus, + "propagate-correlation-id": *propagateCorrelationID, + "redirect-http": config.General.RedirectHTTP, + "root-cert": *pagesRootKey, + "root-key": *pagesRootCert, + "status_path": config.General.StatusPath, + "tls-min-version": *tlsMinVersion, + "tls-max-version": *tlsMaxVersion, + "gitlab-server": config.GitLab.PublicServer, + "internal-gitlab-server": config.GitLab.InternalServer, + "api-secret-key": *gitLabAPISecretKey, + "enable-disk": config.GitLab.EnableDisk, + "auth-redirect-uri": config.Authentication.RedirectURI, + "auth-scope": config.Authentication.Scope, + "max-conns": config.General.MaxConns, + "max-uri-length": config.General.MaxURILength, + "zip-cache-expiration": config.Zip.ExpirationInterval, + "zip-cache-cleanup": config.Zip.CleanupInterval, + "zip-cache-refresh": config.Zip.RefreshInterval, + "zip-open-timeout": config.Zip.OpenTimeout, + "rate-limit-source-ip": config.RateLimit.SourceIPLimitPerSecond, + "rate-limit-source-ip-burst": config.RateLimit.SourceIPBurst, + "rate-limit-domain": config.RateLimit.DomainLimitPerSecond, + "rate-limit-domain-burst": config.RateLimit.DomainBurst, + "rate-limit-tls-source-ip": config.RateLimit.TLSSourceIPLimitPerSecond, + "rate-limit-tls-source-ip-burst": config.RateLimit.TLSSourceIPBurst, + "rate-limit-tls-domain": config.RateLimit.TLSDomainLimitPerSecond, + "rate-limit-tls-domain-burst": config.RateLimit.TLSDomainBurst, }).Debug("Start Pages with configuration") } |