mirror of
https://github.com/simon987/task_tracker.git
synced 2025-12-13 23:09:02 +00:00
some work on sessions
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user