fix (#883): console bug

This commit is contained in:
MickaelK 2025-10-04 04:45:49 +10:00
parent 80adf4d463
commit aa253ddc59

View file

@ -49,11 +49,10 @@ var console_enable = func() bool {
}
func init() {
Hooks.Register.Onload(func() {
if console_enable() == false {
return
}
Hooks.Register.HttpEndpoint(func(r *mux.Router, _ *App) error {
if console_enable() == false {
return ErrNotFound
}
r.PathPrefix("/admin/tty/").Handler(
AuthBasic(
func() (string, string) { return "admin", Config.Get("auth.admin").String() },
@ -62,7 +61,6 @@ func init() {
)
return nil
})
})
}
var notAuthorised = func(res http.ResponseWriter, req *http.Request) {