High performance, minimalist Go web framework
Most notable things
You can now add any arbitrary HTTP method type as a route #2237
e.Add("COPY", "/*", func(c echo.Context) error
return c.String(http.StatusOK, "OK COPY")
})
You can add custom 404 handler for specific paths #2217
e.RouteNotFound("/*", func(c echo.Context) error { return c.NoContent(http.StatusNotFound) })
g := e.Group("/images")
g.RouteNotFound("/*", func(c echo.Context) error { return c.NoContent(http.StatusNotFound) })
Enhancements
Fixes
4.6.2
#2066
Enhancements
Introduced a new request logger middleware to help with cases when you want to use some other logging library in your application.
Fixes
Enhancements
Important notes
A BREAKING CHANGE is introduced for JWT middleware users.
The JWT library used for the JWT middleware had to be changed from github.com/dgrijalva/jwt-go to github.com/golang-jwt/jwt due former library being unmaintained and affected by security issues. The github.com/golang-jwt/jwt project is a drop-in replacement, but supports only the latest 2 Go versions. So for JWT middleware users Go 1.15+ is required. For detailed information please read #1940
To change the library imports in all .go files in your project replace all occurrences of dgrijalva/jwt-go
with golang-jwt/jwt
.
For Linux CLI you can use:
find -type f -name "*.go" -exec sed -i "s/dgrijalva\/jwt-go/golang-jwt\/jwt/g" {} \;
go mod tidy
Fixes
github.com/golang-jwt/jwt
#1946