diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/init.go | 2 | ||||
-rw-r--r-- | routers/web/admin/applications.go | 2 | ||||
-rw-r--r-- | routers/web/repo/http.go | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/routers/init.go b/routers/init.go index ddbabcc397..020fff31c0 100644 --- a/routers/init.go +++ b/routers/init.go @@ -10,6 +10,7 @@ import ( "code.gitea.io/gitea/models" asymkey_model "code.gitea.io/gitea/models/asymkey" + authmodel "code.gitea.io/gitea/models/auth" "code.gitea.io/gitea/modules/cache" "code.gitea.io/gitea/modules/eventsource" "code.gitea.io/gitea/modules/git" @@ -138,6 +139,7 @@ func InitWebInstalled(ctx context.Context) { mustInit(oauth2.Init) mustInitCtx(ctx, models.Init) + mustInitCtx(ctx, authmodel.Init) mustInit(repo_service.Init) // Booting long running goroutines. diff --git a/routers/web/admin/applications.go b/routers/web/admin/applications.go index 7b27524340..b26912db48 100644 --- a/routers/web/admin/applications.go +++ b/routers/web/admin/applications.go @@ -39,7 +39,7 @@ func Applications(ctx *context.Context) { return } ctx.Data["Applications"] = apps - + ctx.Data["BuiltinApplications"] = auth.BuiltinApplications() ctx.HTML(http.StatusOK, tplSettingsApplications) } diff --git a/routers/web/repo/http.go b/routers/web/repo/http.go index 0cae9aeda4..c8ecb3b1d8 100644 --- a/routers/web/repo/http.go +++ b/routers/web/repo/http.go @@ -147,7 +147,7 @@ func httpBase(ctx *context.Context) *serviceHandler { // rely on the results of Contexter if !ctx.IsSigned { // TODO: support digit auth - which would be Authorization header with digit - ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=\".\"") + ctx.Resp.Header().Set("WWW-Authenticate", `Basic realm="Gitea"`) ctx.Error(http.StatusUnauthorized) return nil } |