Releases: labstack/echo
v4.9.0
v4.8.0
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
- Add new value binding methods (UnixTimeMilli,TextUnmarshaler,JSONUnmarshaler) to Valuebinder #2127
- Refactor: body_limit middleware unit test #2145
- Refactor: Timeout mw: rework how test waits for timeout. #2187
- BasicAuth middleware returns 500 InternalServerError on invalid base64 strings but should return 400 #2191
- Refactor: duplicated findStaticChild process at findChildWithLabel #2176
- Allow different param names in different methods with same path scheme #2209
- Add support for registering handlers for different 404 routes #2217
- Middlewares should use errors.As() instead of type assertion on HTTPError #2227
- Allow arbitrary HTTP method types to be added as routes #2237
v4.7.2
v4.7.1
v4.7.0 - 2022-03-01
v4.6.3 - Fix Echo version number
Fixes
- Fixed Echo version number in greeting message which was not incremented to
4.6.2
#2066
v4.6.2
v4.6.1
v4.6.0
Introduced a new request logger middleware
to help with cases when you want to use some other logging library in your application.
Fixes
- fix timeout middleware warning: superfluous response.WriteHeader #1905
Enhancements
- Add Cookie to KeyAuth middleware's KeyLookup #1929
- JWT middleware should ignore case of auth scheme in request header #1951
- Refactor default error handler to return first if response is already committed #1956
- Added request logger middleware which helps to use custom logger library for logging requests. #1980
- Allow escaping of colon in route path so Google Cloud API "custom methods" could be implemented #1988
v4.5.0
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
- Change JWT library to
github.com/golang-jwt/jwt
#1946