diff options
author | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-06-15 13:09:36 +0300 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-07-22 15:23:32 +0300 |
commit | 7a9c492b619078aed6f9c3f95cf21640afd63100 (patch) | |
tree | adc5b78be1cc17fba212e3859e7515d29cbb7760 /app.go | |
parent | b72ce71418f5474b1e7dc455052a32b12ae67c39 (diff) |
Use internal-gitlab-server in auth-related tasks
Update the auth package to use the internal server
when fetching access token or checking for authentication.
Changelog: changed
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -518,8 +518,8 @@ func runApp(config *cfg.Config) { // TODO: This if was introduced when `gitlab-server` wasn't a required parameter // once we completely remove support for legacy architecture and make it required // we can just remove this if statement https://gitlab.com/gitlab-org/gitlab-pages/-/issues/581 - if config.GitLab.Server != "" { - a.AcmeMiddleware = &acme.Middleware{GitlabURL: config.GitLab.Server} + if config.GitLab.PublicServer != "" { + a.AcmeMiddleware = &acme.Middleware{GitlabURL: config.GitLab.PublicServer} } if len(config.General.CustomHeaders) != 0 { @@ -549,9 +549,8 @@ func (a *theApp) setAuth(config *cfg.Config) { } var err error - // TODO: use config.GitLab.InternalServer https://gitlab.com/gitlab-org/gitlab-pages/-/issues/581 a.Auth, err = auth.New(config.General.Domain, config.Authentication.Secret, config.Authentication.ClientID, config.Authentication.ClientSecret, - config.Authentication.RedirectURI, config.GitLab.Server, config.Authentication.Scope) + config.Authentication.RedirectURI, config.GitLab.InternalServer, config.GitLab.PublicServer, config.Authentication.Scope) if err != nil { log.WithError(err).Fatal("could not initialize auth package") } |