some work on sessions

This commit is contained in:
simon987
2019-02-07 22:29:05 -05:00
parent 6ad42366ea
commit f577e76afa
31 changed files with 323 additions and 186 deletions

View File

@@ -39,6 +39,10 @@ func (e *LogRequest) Time() time.Time {
func LogRequestMiddleware(h RequestHandler) fasthttp.RequestHandler {
return fasthttp.RequestHandler(func(ctx *fasthttp.RequestCtx) {
ctx.Response.Header.Add("Access-Control-Allow-Headers", "Content-Type")
ctx.Response.Header.Add("Access-Control-Allow-Methods", "GET, POST, OPTION")
ctx.Response.Header.Add("Access-Control-Allow-Origin", "*")
logrus.WithFields(logrus.Fields{
"path": string(ctx.Path()),
"header": ctx.Request.Header.String(),