feat: add more info
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
parent
a9addc0e8a
commit
6c7d096166
2
frontend
2
frontend
@ -1 +1 @@
|
||||
Subproject commit 16f1dab96546a6e1dbbda0a99f4e325eaf36310f
|
||||
Subproject commit b9dc7e02e718b39c6b12e6946c7ce01b1b08890f
|
||||
11
http/http.go
11
http/http.go
@ -8,6 +8,8 @@ import (
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/filebrowser/filebrowser/auth"
|
||||
|
||||
"github.com/GeertJohan/go.rice"
|
||||
"github.com/filebrowser/filebrowser/types"
|
||||
"github.com/gorilla/mux"
|
||||
@ -37,8 +39,17 @@ func (e *Env) getHandlers() (http.Handler, http.Handler) {
|
||||
// TODO: baseurl must always not have the trailing slash
|
||||
data := map[string]interface{}{
|
||||
"BaseURL": baseURL,
|
||||
"Version": types.Version,
|
||||
"StaticURL": staticURL,
|
||||
"Signup": e.Settings.Signup,
|
||||
"ReCaptcha": false,
|
||||
}
|
||||
|
||||
if e.Settings.AuthMethod == auth.MethodJSONAuth {
|
||||
auther := e.Auther.(auth.JSONAuth)
|
||||
data["ReCaptcha"] = auther.ReCaptcha.Key != "" && auther.ReCaptcha.Secret != ""
|
||||
data["ReCaptchaHost"] = auther.ReCaptcha.Host
|
||||
data["ReCaptchaKey"] = auther.ReCaptcha.Key
|
||||
}
|
||||
|
||||
index := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user