Arun Gopalpuri
2207c37bf8
use echo.GetPath for rewrite in proxy ( #1548 )
...
Co-authored-by: Arun Gopalpuri <arun@gopalpuri.com>
2020-04-08 08:19:22 -07:00
Vishal Rana
6e7c7cea03
Bumped version
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2020-03-30 12:32:58 -07:00
Vishal Rana
fc4b1c0a83
Omit internal=<nil>
in error strings ( #1525 )
2020-03-05 06:36:43 -08:00
Vishal Rana
3e8a797db0
Updated version
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2020-02-29 07:49:22 -08:00
Shinichi TAMURA
7c5af01350
Safer/trustable extraction of real ip from request ( #1478 )
...
* Safer/trustable extraction of real ip from request
* Fix x-real-ip handling on proxy
* fix docs
* fix default check
2020-02-24 08:29:34 -08:00
Jur van den Berg
504f39abaf
Fix crash on OpenBSD due to unsupported TCP KeepAlivePeriod ( #1456 )
2020-02-03 10:09:27 -08:00
ochan
c2f2e8d258
Support HTTP/2 h2c mode (cleartext) ( #1489 )
2020-01-28 14:46:00 -08:00
Ajitem Sahasrabuddhe
5bf6888444
Parameterized routes sometimes return 404 ( #1480 )
...
* url param bug
* add comment
* add tests
* Bump echo version
2020-01-23 16:13:18 -08:00
Ajitem Sahasrabuddhe
5793765eed
Fix param value bug ( #1467 )
...
* set parameter value in the pvalues slice
* update echo version
* update travis yml to fix failing build and add go modules support
* Add tests
* Update router_test.go
Co-authored-by: Vishal Rana <vr@labstack.com>
2020-01-01 08:57:00 -08:00
Vishal Rana
c50c67783f
Fixed #1426
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-10-30 19:01:23 -07:00
Vishal Rana
d286e285dc
Bumped v4.1.11
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-10-06 17:01:28 -07:00
Vishal Rana
88a9ad73ec
Updated dep & bumped v4.1.10
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-08-17 07:39:36 -07:00
Vishal Rana
350ccd2452
Bumped vv4.1.9
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-08-11 12:55:02 -07:00
Vishal Rana
2b0cfbe75d
Merge branch 'master' of https://github.com/labstack/echo
2019-08-11 12:48:52 -07:00
Vishal Rana
ecc01d2051
Include internal error in http error handler
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-08-11 12:48:50 -07:00
Jesse Szwedko
608cebbaae
Assign new ResponseWriter after calling http.HandlerFunc ( #1341 )
...
Otherwise, the `http.ResponseWriter` passed to `next()` within the
middleware is unused. This precludes middlewares from wrapping the
http.ResponseWriter to do things like record the status code.
2019-08-07 11:10:18 -07:00
Vishal Rana
09d415cefc
Fixed version
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-08-04 21:47:41 -07:00
Vishal Rana
ed51400a81
Enhanced default http error handler
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-08-01 22:52:42 -07:00
Hylke Visser
87da9a948b
Add ReferrerPolicy to Secure middleware ( #1363 )
2019-08-01 15:27:09 -07:00
Nipe Setiawan
01229ec651
fix version string to 4.1.6 ( #1358 )
2019-07-01 09:58:23 -07:00
kolaente
610d67f17f
Added support for the REPORT method ( #1332 )
2019-06-09 09:11:18 -07:00
Vishal Rana
5d2c33ad5d
Bumped v4.1.5
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-04-29 22:54:49 -07:00
Vishal Rana
64c6d92295
Fixed group middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-04-29 16:46:08 -07:00
Vishal Rana
f27e87f36e
Fixed golint error
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-04-29 13:53:12 -07:00
Vishal Rana
4de244c072
Fixed invalid json value for error in logger middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-04-29 13:21:11 -07:00
Vishal Rana
8c13b9dae2
Fixed sub-group virtual hosts
2019-04-28 23:10:00 -07:00
Vishal Rana
46ae04bef2
Added a method to return routers map
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-04-28 22:49:18 -07:00
Vishal Rana
c8e923cf54
Bumped 4.1.0
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-04-28 22:25:45 -07:00
Vishal Rana
6f0a227a5a
Built-in capability to run multiple hosts
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-04-28 22:22:35 -07:00
Andrew Braunstein
e3717be4be
ensure that the TLS conifg contains the ALPN protocol ( #1305 )
2019-03-12 17:54:16 -07:00
Hemachandar
08db4bd39b
simplify middleware chain creation ( #1299 )
2019-03-05 08:24:59 -08:00
Kumar Harsh
802fb5bba6
feat(secure): support Content-Security-Policy-Report-Only header ( #1287 )
...
Closes #1283
2019-02-26 22:32:07 -08:00
Mohamed Bana
8716acb0ab
Echo.StartTLS
: accept string
or []byte
as parameters. (#1277 )
...
If `certFile` or `keyFile` is `string` the values are treated as file paths.
If `certFile` or `keyFile` is `[]byte` the values are treated as the certificate or key as-is.
2019-02-15 09:51:54 -08:00
Evgeniy Kulikov
bc28fceaf3
Fix unhandled errors ( #1271 )
2019-02-01 06:33:56 -08:00
Alex Ungur
6d9e043284
Introduced Go module support as v4, removed obsolete CloseNotifier() mechanism
...
This reintroduces support for Go modules, as v4.
CloseNotifier() is removed as it has been obsoleted, see https://golang.org/doc/go1.11#net/http
It was already NOT working (not sending signals) as of 1.11 the functionality was gone, we merely
deleted the functions that exposed it. If anyone still relies on it they should migrate to using
`c.Request().Context().Done()` instead.
Closes #1268 , #1255
2019-01-30 16:11:42 +02:00
Alex Ungur
0b714f3482
Bumped up the version
2019-01-28 17:43:48 +02:00
Alex Ungur
afe90e79d9
Bumped up version to include -dev
2019-01-27 00:44:28 +02:00
Alex Ungur
739700bf4e
Bumped up version to 3.3.9 (related to #1244 )
2019-01-27 00:39:45 +02:00
Shu Kutsuzawa
e6ac0023d2
Add golint to ci ( #1243 )
...
* add golint to travis ci
* fixed based on golint
* Update echo.go
2019-01-09 15:19:48 -08:00
Charlie Bevis
1481763035
comment typo fix ( #1246 )
2019-01-09 15:14:26 -08:00
Vishal Rana
ba46ff80a4
Using tls-alpn for auto tls
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-11-08 19:17:59 -08:00
Alexandru Ungur
ba1891b3dc
Add back exported HTTP method constants ( #1209 )
2018-10-15 13:01:26 +05:30
Emir Ribić
c8fd197fa8
Replace http constants with stdlib ones, i.e.: http.MethodGet instead of echo.GET ( #1205 )
2018-10-14 20:46:58 +05:30
Gregor Noczinski
bc37a3a792
Proxy: Better errors + remote custom TLS ( #1197 )
...
Proxy will be more verbose on errors + possibility to configure custom transport (example: for custom TLS certificates)
2018-10-13 11:40:19 +05:30
Sukma Setyaji
0d93bdd2b5
Add common error variable ( #1200 )
2018-10-07 07:38:24 +05:30
Thuc Le
f7470482fe
Support internal error when Bind() data #888 ( #1164 )
2018-09-28 10:41:13 -07:00
Sukma Setyaji
eb84122d4e
Add error variable for too many request ( #1181 )
...
* add error variable for too many request
* update errTooManyRequests
2018-09-28 10:28:03 -07:00
Bertram Truong
1ae109c688
Expose stdLogger ( #1196 )
2018-09-28 10:09:35 -07:00
takaya kusanagi
31e795315a
change getting method point after overriding method in premiddleware ( #1182 )
2018-08-28 18:50:58 -07:00
Andrei Serban
2017e5e541
logs the internal error message instead of returning it ( #1173 )
2018-08-02 14:11:20 -07:00
Philipp Gillé
76d8adbf2d
Fix typo
2018-07-29 14:00:49 -07:00
chanxuehong
5ac8bedce8
rm unused code
2018-06-22 07:49:53 -07:00
Vishal Rana
f867058e3b
Update echo.go
2018-04-16 10:20:39 -07:00
roxma
6016350b4c
Allow using middleware with echo.File
2018-04-16 10:20:39 -07:00
Vishal Rana
b64e4d12c7
Removed error log from http error handler
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-04-15 14:00:04 -07:00
Vishal Rana
88a865e8a2
Changed version for master branch
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-04-11 11:52:24 -07:00
Vishal Rana
5b769f91b2
HTTPError#Inner to HTTPError#Internal
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-04-10 12:06:31 -07:00
Alexandre Stein
37f1a470ef
Replace the redirection with a direct call to url package
2018-04-03 08:40:03 -07:00
Alexandre Stein
af1bfd5397
Clean old Go versions
2018-04-03 08:40:03 -07:00
Andrew Wilkins
60f88a7a1c
Export version
...
I'm looking into implementing tracing middleware for Echo
(https://github.com/elastic/apm-agent-go/issues/20 ). I'd
like to report the version of the Echo framework in use.
2018-03-21 21:42:26 -07:00
Vishal Rana
a5d81b8d4a
Updated deps, removed json-iterator, fixed #1087 , fixed #1086
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-03-16 10:00:59 -07:00
Jeffrey Reuling (TI)
ee32e3e7fb
fix issue #1086
2018-03-16 09:47:05 -07:00
Vishal Rana
7f44549f02
Separate handling for pre middleware to improve performance
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-03-14 23:53:32 -07:00
Vishal Rana
20ac716d4c
Using json-iterator
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-03-14 20:38:46 -07:00
Vishal Rana
62d3587b6f
Minor performance fixes
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-03-14 14:03:59 -07:00
Vishal Rana
bdb49be734
Added PROPFIND method
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-03-13 12:45:47 -07:00
Alex Ungur
27b5253bfd
Release 3.3.0:
...
Enhancements:
Implemented Response#After()
Dynamically add/remove proxy targets
Rewrite rules for proxy middleware
Add ability to extract key from a form field
Implemented rewrite middleware
Adds a separate flag for the 'http/https server started on' message (#1043 )
Applied a little DRY to the redirect middleware (#1053 ) and tests (#1055 )
Simplify dep fetching (#1062 )
Add custom time stamp format #1046 (#1066 )
Update property name & default value & comment about custom logger
Add X-Requested-With header constant
Return error of context.File in c.contentDisposition
Updated deps
Updated README.md
Fixes:
Fixed Response#Before()
Fixed #990
Fix href url from armor to echo (#1051 )
Fixed #1054
Fixed #1052 , dropped param alias feature
Avoid redirect loop in HTTPSRedirect middleware (#1058 )
Fix deferring body close in middleware/compress test (#1063 )
Cleanup code (#1061 )
FIX - We must close gzip.Reader, only if no error (#1069 )
Fix formatting (#1071 )
Can be a fix for auto TLS
2018-03-12 13:58:01 -07:00
Vishal Rana
f32481f68c
Revert "Fixed #1078 "
...
This reverts commit 8e47545434
.
2018-03-12 13:01:59 -07:00
Vishal Rana
8e47545434
Fixed #1078
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-03-11 08:20:37 -07:00
Alex Ungur
9b9f4facd6
Add X-Requested-With header constant
2018-03-06 10:29:20 -08:00
Alexandre Stein
7f6c0f4fc0
Can be a fix for auto TLS
2018-03-01 12:08:34 -08:00
Vishal Rana
4f3080c197
Bit of more cleanup
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-02-21 11:38:22 -08:00
Evgeniy Kulikov
f49d166e6f
[FIX] Cleanup code ( #1061 )
...
Code cleanup
2018-02-21 10:44:17 -08:00
Ben Katz
c8bedd1cf9
Adds a separate flag for the 'http/https server started on' message ( #1043 )
2017-12-29 10:57:59 -08:00
Vishal Rana
b338075a0f
Update dummy group path to include exact prefix
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-12-23 09:11:03 -08:00
Vishal Rana
8e421d9773
Fixed #1019
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-12-22 12:09:52 -08:00
Vishal Rana
0473c51f1d
Released 3.2.5
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-11-22 17:58:59 -08:00
Vishal Rana
b5de47f165
Send error details when Echo#Debug is true, #817
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-09-21 08:46:47 -07:00
Vishal Rana
b7c4ccf8f3
Fixed typo
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-09-19 22:15:12 -07:00
Vishal Rana
1678da53d6
Closes #1006
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-09-08 08:48:23 -07:00
Vishal Rana
7dfec7e641
Custom jwt errors ( #999 )
...
* Custom error for jwt
* New field `inner` in HTTPError to store error from external dependency
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-08-31 09:18:42 -07:00
Vishal Rana
57bf87258f
Fixed #995
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-08-24 08:27:15 -07:00
Vishal Rana
a26bc31e27
Setting log level to ERROR
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-08-17 19:46:17 -07:00
Nick Law
e0ea129c5c
Expose echo.Add() for dynamic route registration ( #965 )
2017-07-03 19:10:58 -07:00
Vishal Rana
ee85b46a05
Changed signature for response before func
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-29 10:59:21 -07:00
Vishal Rana
f96c973a25
Fixed #176 , closed #831
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-28 17:01:48 -07:00
Vishal Rana
7c614588bc
Updated github issue template
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-22 11:27:49 -07:00
Miha Valencic
c04b028852
Support route naming and generating URLs based on route names ( #960 )
...
* Route registration methods return Route object
* Renamed Route#Handler to Route#Name
* Adding route return value to Any, Match, Static and File methods.
2017-06-22 10:59:02 -07:00
Vishal Rana
935a60782c
Missed version label
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-21 08:07:43 -07:00
Vishal Rana
687f05470a
Zhaojkun httperror message ( #959 )
...
* Change echo http error message
* Add test case
* Fixed test cases
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-20 08:58:53 -07:00
Vishal Rana
dc0f2d7327
Fixed url.PathUnescape for go1.7
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-07 08:57:31 -07:00
Vishal Rana
c05db06020
Fixed #947 , closes #948
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-07 08:23:43 -07:00
Vishal Rana
bd96cc3c15
Fixed #947
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-06 14:59:35 -07:00
Vishal Rana
c3887ebb13
Added Context#IsWebSocket(), proxy fix header
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-04 10:39:08 -07:00
TossPig
353a2f8b78
Get The HeaderXForwardedProto ( #941 )
...
* Get The HeaderXForwardedProto
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto
* add HeaderXForwardedSsl
* Get The HeaderXForwardedSsl
2017-06-04 09:41:17 -07:00
Vishal Rana
0898d9e68b
Exposed proxy balancer interface
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-03 17:37:35 -07:00
Vishal Rana
3359eae306
Add json tags to route struct
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-05-16 16:29:33 -07:00
Vishal Rana
8f5fb6395a
Dropping mutex from ServeHTTP
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-05-13 14:12:35 -07:00
Vishal Rana
0e134ee37c
Closes #928
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-05-12 10:47:24 -07:00
Vishal Rana
1302a08009
Fixed #925
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-05-10 10:28:50 -07:00