1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-24 08:22:21 +02:00
Commit Graph

1641 Commits

Author SHA1 Message Date
toimtoimtoim
b010b69329 Bump dependencies and add notes about Go releases we support 2022-11-12 21:52:54 +02:00
Hristo Hristov
0ce73028d0
[suggestion] Add helper interface for ProxyBalancer interface (#2316)
* [suggestion] Add helper interface for ProxyBalancer interface

* Update proxy_test.go

* addressed code review comments

* address pr comments

* clean up

* return error
2022-10-29 21:54:23 +03:00
Patrick Brueckner
8f2bf82982 go mod tidy 2022-10-18 11:51:53 +03:00
Patrick Brueckner
b02e78ba55 bump x/text to 0.3.8
see https://go.dev/issue/56152, https://ossindex.sonatype.org/vulnerability/CVE-2022-32149?component-type=golang&component-name=golang.org%2Fx%2Ftext&utm_source=nancy-client&utm_medium=integration&utm_content=1.0.41
2022-10-18 11:51:53 +03:00
toimtoimtoim
8ad22302f2 Changelog for v4.9.1 2022-10-12 22:37:08 +03:00
toimtoimtoim
56f63c3036 bump github.com/labstack/gommon dependency version 2022-10-12 22:37:08 +03:00
Martti T
1d5f335f40
refactor assertions (#2301) 2022-10-12 21:47:21 +03:00
Amir Hossein
4c44305b23
update tests (#2275)
update tests
2022-10-06 11:34:00 +03:00
Martti T
79221d91ca
Update readme about supported Go versions (#2291) 2022-10-05 06:36:12 +03:00
Amir Hossein
666938e523
tests: error handling on closing body (#2254)
* tidy up tests
2022-09-14 08:40:39 +03:00
Daniel Price
50e7e569f0 Improve CORS documentation
* Provide links to further reading
* Provide security warnings
* Document undocumented wildcard feature
* Update to go-1.19 style links
2022-09-12 22:46:13 +03:00
toimtoimtoim
16d3b65eb0 Changelog for 4.9.0 2022-09-04 23:04:47 +03:00
toimtoimtoim
0ac4d74402 Fix #2259 open redirect vulnerability in echo.StaticDirectoryHandler (used by e.Static, e.StaticFs etc)
remove pre Go1.16 and after differences
2022-09-04 22:50:54 +03:00
Mojtaba Arezoumand
d77e8c09b2
Added ErrorHandler and ErrorHandlerWithContext in CSRF middleware (#2257)
* feat: add error handler to csrf middleware

Co-authored-by: Mojtaba Arezoomand <mojtaba.arezoomand@snapp.cab>
2022-09-01 10:51:55 +03:00
Kamandlou
534bbb81e3 replace POST constance with stdlib constance 2022-08-20 22:25:45 +03:00
Kamandlou
fb57d96a6d replace GET constance with stdlib constance 2022-08-20 22:25:45 +03:00
toimtoimtoim
d48197db7a Changelog for 4.8.0 2022-08-10 23:12:40 +03:00
toimtoimtoim
cba12a570e Allow arbitrary HTTP method types to be added as routes 2022-08-10 22:04:06 +03:00
go-woo
a327884b68 add:README.md-Third-party middlewares-github.com/go-woo/protoc-gen-echo 2022-08-09 14:47:09 +03:00
toimtoimtoim
61422dd7de Update CI-flow (Go 1.19 +deps) 2022-08-07 06:53:31 +03:00
Daniel Price
a9879ffa6b Middlewares should use errors.As() instead of type assertion on HTTPError
- Helps consumers who want to wrap HTTPError, and other use cases
2022-07-21 21:24:18 +03:00
Martti T
70acd57105
Fix case when routeNotFound handler is lost when new route is added to the router (#2219) 2022-07-13 08:16:27 +03:00
Martti T
690e3392d9
Add support for registering handlers for 404 routes (#2217) 2022-07-12 21:53:41 +03:00
Artem Iurin
9bf1e3c8ce
Allow different param names in different methods with same path scheme (#2209)
* Change methodHandler element type to methodContext

Signed-off-by: ortyomka <iurin.art@gmail.com>

* Allow different param names in the smae path with different methods

Signed-off-by: ortyomka <iurin.art@gmail.com>

* Rename methodContext to routeMethod
Add paramsCount in each node for perfomance

Signed-off-by: ortyomka <iurin.art@gmail.com>

* Add backtracking to nearest path

Signed-off-by: ortyomka <iurin.art@gmail.com>

* Remove params from NotAllowed

Signed-off-by: ortyomka <iurin.art@gmail.com>
2022-07-11 20:25:41 +03:00
moznion
ddb66e1ba2
Add logger middleware template variables: ${time_unix_milli} and ${time_unix_micro} (#2206)
This patch introduces two template variables `${time_unix_milli}` and
`${time_unix_micro}` into the logger middleware.
Currently, there is no way to interpolate that UNIX milli and micro
seconds timestamp in a log entry, and go 1.17 or later runtime supports
the utility functions `time#UnixMilli()` and `time#UnixMicro()`
so this patch adds them as well.

see also: https://github.com/golang/go/issues/44196

Signed-off-by: moznion <moznion@mail.moznion.net>
2022-07-05 07:57:39 +03:00
lkeix
0644cd6ecd
fix: duplicated findStaticChild process at findChildWithLabel (#2176) 2022-05-27 20:15:58 +03:00
welling guzmán
b0453b98e0
fix: basic auth invalid base64 string (#2191)
* fix: basic auth returns 400 on invalid base64 string
2022-05-27 19:44:51 +03:00
Martti T
d5f883707b
Timeout mw: rework how test waits for timeout. Using sleep as delay i… (#2187)
* Timeout mw: rework how test waits for timeout. Using sleep as delay is problematic when CI worker is slower than usual.
2022-05-22 00:21:50 +03:00
toimtoimtoim
28797c761d Timeout mw: fix datarace in tests when we are getting data from buffer (in test) and writing to logger at the same time. 2022-05-21 22:26:56 +03:00
toimtoimtoim
2e02ce3dd8 Timeout mw: fix datarace in tests when we are getting data from buffer. Run each test in their own server so multiple tests cases will not cause datarace getting data out of logger buffer. 2022-05-21 20:12:32 +03:00
Roland Lammel
6df1c355c2
Merge pull request #2166 from aldas/ci_with_go1_18
Update Github CI flow to use Go 1.18, bump actions versions
2022-05-02 10:26:37 +02:00
toimtoimtoim
a987b6577c
Update Github CI flow to use Go 1.18, bump actions versions 2022-04-29 22:34:24 +03:00
gemaizi
572466d928 Fix body_limit middleware unit test 2022-04-05 20:34:49 +03:00
Roland Lammel
63c62bcbe5 Tidy up comments for value binders 2022-03-17 14:14:42 +02:00
toimtoimtoim
59d2eaa4ac Add new value binding methods (UnixTimeMilli,TextUnmarshaler,JSONUnmarshaler) to ValueBinder 2022-03-17 14:14:42 +02:00
toimtoimtoim
ec92fedf21 Update version and changelog for 4.7.2 2022-03-16 09:34:26 +02:00
toimtoimtoim
1919cf4491 Timeout middleware write race 2022-03-16 08:09:29 +02:00
Martti T
01d7d01bbc
Fix CSRF middleware not being able to extract token from multipart/form-data form (#2136, fixes #2135) 2022-03-16 00:43:20 +01:00
Becir Basic
5c38c3b770
Recover middleware should not log panic for aborted handler (#2134, fixes #2133)
Co-authored-by: Becir Basic <bb@neotel.at>
2022-03-16 00:29:42 +01:00
Gabriel Nelle
05df10c62f fix nil pointer exception when calling Start again after address binding error 2022-03-15 21:38:57 +02:00
toimtoimtoim
b445958c3c Update version and changelog for 4.7.1 2022-03-13 18:43:24 +02:00
eric
54efc3850d
remove some unused code (#2116)
* remove unused code
2022-03-13 15:31:39 +02:00
Martti T
3f5b733425
Fix e.Static, .File(), c.Attachment() being picky with paths starting with ./, ../ and / after 4.7.0 introduced echo.Filesystem support (Go1.16+) (#2123)
* Fix `e.Static`, `.File()`, `c.Attachment()` being picky with paths starting with `./`, `../` and `/` after 4.7.0 introduced echo.Filesystem support (Go1.16+)
2022-03-13 15:05:12 +02:00
Roland Lammel
5ebed440ae Update version to v4.7.0 2022-03-02 23:16:19 +01:00
Roland Lammel
da85d23d68 Revert "Update direct golang deps"
This reverts commit d66712b252.
2022-03-02 23:11:46 +01:00
Roland Lammel
d66712b252 Update direct golang deps 2022-03-02 22:59:19 +01:00
Wagner Souza
7e719b46e2
Add cache-control and connection headers (#2103)
Co-authored-by: Wagner Souza <wagner.souza@accenture.com>
2022-03-02 00:11:28 +01:00
Yusuf Eyisan
124825ee62
Bugfix/1834 Fix X-Real-IP bug (#2007)
* Fix incorrect return ip value for RealIpHeader
* Improve test file to compare correct real IPs to each other and have better comments
* Refactor ip extractor tests to be more readable (longer but readable)

Co-authored-by: toimtoimtoim <desinformatsioon@gmail.com>
2022-03-01 08:56:46 +01:00
eric
27b404bbc5
remove unused notFoundHandler in echo struct (#2102)
* remove unused notFoundHandler in echo
2022-02-23 13:28:20 +02:00
eric
6cb3b7c046
remove redundant 0 in make chan (#2101)
* remove 0 in make(chan,0) to fix go-staticcheck problem
2022-02-23 09:22:20 +02:00