feat: no log
parent
8621dc370e
commit
2c68c8cddb
|
@ -2,11 +2,27 @@ package server
|
|||
|
||||
import (
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/rs/xid"
|
||||
)
|
||||
|
||||
func DefaultSkipLog(c *gin.Context) bool {
|
||||
switch filepath.Ext(c.Request.URL.Path) {
|
||||
case ".css":
|
||||
fallthrough
|
||||
case ".woff2":
|
||||
fallthrough
|
||||
case ".map":
|
||||
fallthrough
|
||||
case ".js":
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
type Response struct {
|
||||
Status int `json:"status"`
|
||||
ID string `json:"id"`
|
||||
|
|
Loading…
Reference in New Issue