Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2021-06-15 13:09:36 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2021-07-22 15:23:32 +0300
commit7a9c492b619078aed6f9c3f95cf21640afd63100 (patch)
treeadc5b78be1cc17fba212e3859e7515d29cbb7760 /app.go
parentb72ce71418f5474b1e7dc455052a32b12ae67c39 (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.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/app.go b/app.go
index 99fd2976..78c254b9 100644
--- a/app.go
+++ b/app.go
@@ -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")
}