added support for config files, openbsd, pledge and unveil

This commit is contained in:
ston1th 2018-10-26 17:28:50 +02:00
commit 375933c7bc
14 changed files with 138 additions and 49 deletions

View file

@ -6,6 +6,7 @@ import (
"bytes"
"context"
"errors"
"git.giftfish.de/ston1th/godrop/v2"
"git.giftfish.de/ston1th/gowiki/pkg/core"
"git.giftfish.de/ston1th/gowiki/pkg/db"
"git.giftfish.de/ston1th/gowiki/pkg/log"
@ -57,6 +58,10 @@ func (s *HTTPServer) Start() (err error) {
if err != nil {
return errors.New("db: " + err.Error())
}
err = godrop.UnveilBlock()
if err != nil {
return
}
if s.Secret != "" {
s.JWT, err = jwt.New(jwt.DefaultExpiry, s.DB, bytes.NewBufferString(s.Secret))
} else {