debug mode
This commit is contained in:
parent
95f3a714b3
commit
9988f5c4b4
|
@ -123,6 +123,11 @@ file which is important to backup and restore.
|
||||||
is not currently hardened against SSRF, server side request forgery.
|
is not currently hardened against SSRF, server side request forgery.
|
||||||
Be mindful of what other services may be exposed via localhost or the
|
Be mindful of what other services may be exposed via localhost or the
|
||||||
local network.
|
local network.
|
||||||
|
.Sh DEBUG
|
||||||
|
Debug mode may be enabled or disabled by running
|
||||||
|
.Ic debug Ar on|off .
|
||||||
|
In debug mode, secure cookies are disabled and templates are reloaded
|
||||||
|
every request.
|
||||||
.Sh ENVIRONMENT
|
.Sh ENVIRONMENT
|
||||||
Image processing and scaling requires considerable memory.
|
Image processing and scaling requires considerable memory.
|
||||||
It is recommended to adjust the datasize ulimit to at least 1GB.
|
It is recommended to adjust the datasize ulimit to at least 1GB.
|
||||||
|
|
12
honk.go
12
honk.go
|
@ -169,6 +169,18 @@ func main() {
|
||||||
getconfig("honksep", &honkSep)
|
getconfig("honksep", &honkSep)
|
||||||
prepareStatements(db)
|
prepareStatements(db)
|
||||||
switch cmd {
|
switch cmd {
|
||||||
|
case "debug":
|
||||||
|
if len(os.Args) != 3 {
|
||||||
|
log.Fatal("need an argument: debug (on|off)")
|
||||||
|
}
|
||||||
|
switch os.Args[2] {
|
||||||
|
case "on":
|
||||||
|
saveconfig("debug", 1)
|
||||||
|
case "off":
|
||||||
|
saveconfig("debug", 0)
|
||||||
|
default:
|
||||||
|
log.Fatal("argument must be on or off")
|
||||||
|
}
|
||||||
case "adduser":
|
case "adduser":
|
||||||
adduser()
|
adduser()
|
||||||
case "chpass":
|
case "chpass":
|
||||||
|
|
Loading…
Reference in New Issue