mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
fix (#883): console bug
This commit is contained in:
parent
80adf4d463
commit
aa253ddc59
1 changed files with 9 additions and 11 deletions
|
|
@ -49,19 +49,17 @@ var console_enable = func() bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
Hooks.Register.Onload(func() {
|
Hooks.Register.HttpEndpoint(func(r *mux.Router, _ *App) error {
|
||||||
if console_enable() == false {
|
if console_enable() == false {
|
||||||
return
|
return ErrNotFound
|
||||||
}
|
}
|
||||||
Hooks.Register.HttpEndpoint(func(r *mux.Router, _ *App) error {
|
r.PathPrefix("/admin/tty/").Handler(
|
||||||
r.PathPrefix("/admin/tty/").Handler(
|
AuthBasic(
|
||||||
AuthBasic(
|
func() (string, string) { return "admin", Config.Get("auth.admin").String() },
|
||||||
func() (string, string) { return "admin", Config.Get("auth.admin").String() },
|
TTYHandler("/admin/tty/"),
|
||||||
TTYHandler("/admin/tty/"),
|
),
|
||||||
),
|
)
|
||||||
)
|
return nil
|
||||||
return nil
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue