debug log all incoming http headers
trying to figure out how to get baseurl
This commit is contained in:
parent
038ef3faa0
commit
099692c91b
4 changed files with 41 additions and 3 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"errors"
|
||||
|
||||
echo "github.com/labstack/echo/v4"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"git.janky.solutions/finn/lockserver/db"
|
||||
"git.janky.solutions/finn/lockserver/frontend"
|
||||
|
@ -22,6 +23,10 @@ type indexTemplateData struct {
|
|||
}
|
||||
|
||||
func indexHandler(c echo.Context) error {
|
||||
for k, v := range c.Request().Header {
|
||||
logrus.WithFields(logrus.Fields{"header": k, "value": v}).Debug("request header")
|
||||
}
|
||||
|
||||
queries, dbc, err := db.Get()
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -76,7 +76,7 @@ func accessLogMiddleware(next echo.HandlerFunc) echo.HandlerFunc {
|
|||
if err != nil {
|
||||
log = log.WithError(err)
|
||||
}
|
||||
log.Info("request handled")
|
||||
log.Debug("request handled")
|
||||
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue