Merge branch 'main' into std-http

This commit is contained in:
6543 2022-08-28 14:35:27 +02:00
commit e1c78d6069
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE
17 changed files with 138 additions and 79 deletions

View file

@ -4,11 +4,11 @@ package server
import (
"bytes"
"fmt"
"net/http"
"time"
"github.com/rs/zerolog/log"
"github.com/valyala/fasthttp"
"codeberg.org/codeberg/pages/server/cache"
@ -18,7 +18,7 @@ import (
type fasthttpLogger struct{}
func (fasthttpLogger) Printf(format string, args ...interface{}) {
log.Printf("[FASTHTTP] "+format, args...)
log.Printf("FastHTTP: %s", fmt.Sprintf(format, args...))
}
func SetupServer(handler fasthttp.RequestHandler) *fasthttp.Server {