mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-11 17:02:27 +08:00
update vendor & fix upload file url & fix judge file type
This commit is contained in:
1
vendor/github.com/gin-gonic/contrib/README.md
generated
vendored
1
vendor/github.com/gin-gonic/contrib/README.md
generated
vendored
@@ -35,3 +35,4 @@ Each author is responsible of maintaining his own code, although if you submit a
|
||||
+ [static](https://github.com/hyperboloide/static) An alternative static assets handler for the gin framework.
|
||||
+ [xss-mw](https://github.com/dvwright/xss-mw) - XssMw is a middleware designed to "auto remove XSS" from user submitted input
|
||||
+ [gin-helmet](https://github.com/danielkov/gin-helmet) - Collection of simple security middleware.
|
||||
+ [gin-jwt-session](https://github.com/ScottHuangZL/gin-jwt-session) - middleware to provide JWT/Session/Flashes, easy to use while also provide options for adjust if necessary. Provide sample too.
|
||||
|
||||
6
vendor/github.com/gin-gonic/contrib/ginrus/ginrus.go
generated
vendored
6
vendor/github.com/gin-gonic/contrib/ginrus/ginrus.go
generated
vendored
@@ -10,6 +10,10 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type loggerEntryWithFields interface {
|
||||
WithFields(fields logrus.Fields) *logrus.Entry
|
||||
}
|
||||
|
||||
// Ginrus returns a gin.HandlerFunc (middleware) that logs requests using logrus.
|
||||
//
|
||||
// Requests with errors are logged using logrus.Error().
|
||||
@@ -18,7 +22,7 @@ import (
|
||||
// It receives:
|
||||
// 1. A time package format string (e.g. time.RFC3339).
|
||||
// 2. A boolean stating whether to use UTC time zone or local.
|
||||
func Ginrus(logger *logrus.Logger, timeFormat string, utc bool) gin.HandlerFunc {
|
||||
func Ginrus(logger loggerEntryWithFields, timeFormat string, utc bool) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
start := time.Now()
|
||||
// some evil middlewares modify this values
|
||||
|
||||
Reference in New Issue
Block a user