diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2021-06-15 08:56:21 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2021-06-21 03:07:54 +0300 |
commit | acb3ab3e87e16e6f2fa5d7d03c43a7d0220e7775 (patch) | |
tree | 5bbcad6a8d47c5f9f7dcf214448e23195469b3cf /app.go | |
parent | 4758b49493719e3ced7ac266ad1a9664cd3e62de (diff) |
Use stub in acme_test.go
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -514,7 +514,11 @@ func runApp(config *cfg.Config) { a.Handlers = handlers.New(a.Auth, a.Artifact) + // TODO: This check is a side effect of defining `-gitlab-server` or not which seems wrong. + // Maybe we need an extra flag to disable it https://gitlab.com/gitlab-org/gitlab-pages/-/issues/582 + // and enable it by default now that we will always use the API if config.GitLab.Server != "" { + // TODO: use config.GitLab.InternalServer https://gitlab.com/gitlab-org/gitlab-pages/-/issues/581 a.AcmeMiddleware = &acme.Middleware{GitlabURL: config.GitLab.Server} } @@ -545,6 +549,7 @@ 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) if err != nil { |