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:
Diffstat (limited to 'app.go')
-rw-r--r--app.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/app.go b/app.go
index 0c8bf52f..166adfdd 100644
--- a/app.go
+++ b/app.go
@@ -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 {