ferhat elmas
7eec915044
Fix deferring body close in middleware/compress test ( #1063 )
2018-02-19 08:21:01 -08:00
Airking05
181e11a330
[Add] custom time stamp format #1046 ( #1066 )
...
* [Add] custom time stamp format
* [Update] property name & default value & comment about custom logger
2018-02-19 08:05:09 -08:00
orangain
ef82f3e034
Avoid redirect loop in HTTPSRedirect middleware ( #1058 )
...
In HTTPSRedirect and similar middlewares, determining if redirection is
needed using `c.IsTLS()` causes redirect loop when an application is running
behind a TLS termination proxy, e.g. AWS ELB.
Instead, I believe, redirection should be determined by
`c.Scheme() != "https"`. This works well even behind a TLS termination proxy.
2018-02-02 07:31:07 -08:00
Vishal Rana
ec048ea523
Fixed #1052 , dropped param alias feature
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-01-30 19:02:29 -08:00
Vishal Rana
67a5dcdb91
Fixed #1054
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-01-30 10:36:20 -08:00
Alexandru Ungur
7c1071dcb1
DRY'ed the redirect middleware tests a little ( #1055 )
2018-01-30 10:02:26 -08:00
Vishal Rana
37a2533ad4
Updated readme
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-01-29 20:03:53 -08:00
Alexandru Ungur
2769113edf
Applied a little DRY to the redirect middleware ( #1053 )
2018-01-29 19:54:02 -08:00
Vishal Rana
da083ffd0a
Implemented rewrite middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-12-28 11:26:50 -08:00
Vishal Rana
434f4d1ae8
Fixed #990
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-12-28 10:41:13 -08:00
jerCarre
d174d65fd5
Update key_auth.go ( #984 )
...
Add ability to extract key from a form field
2017-12-28 09:32:14 -08:00
Vishal Rana
9ae7047759
Rewrite rules for proxy middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-12-27 15:14:44 -08:00
Vishal Rana
62f95acdd7
Dynamically add/remove proxy targets
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-12-25 14:39:37 -08:00
Cuong Manh Le
7fe7f348eb
Basic scheme is case-insensitive ( #1033 )
2017-11-20 15:57:41 -08:00
Vishal Rana
914a544bef
Updated recover middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-09-21 12:07:04 -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
f2bc6802be
Exposed JWT error
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-08-31 10:17:27 -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
Amr Tamimi
7d67651a3b
check proxy skipper before proceeding ( #992 )
2017-08-19 18:42:58 -07:00
Paul Tyng
a5c75b002d
Fix issue with JWT race ( #968 )
2017-07-14 11:55:19 -07:00
Vishal Rana
c7531df815
Fixed build
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-28 19:08:45 -07:00
Vishal Rana
17c4df3e77
Fixed #444 , closed #964
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-28 10:05:09 -07:00
Vishal Rana
83eadbad18
Fixed #963
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-24 09:50:07 -07:00
Vishal Rana
06189d002b
Fixed panic messages
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-22 22:48:23 -07:00
Nick Hudkins
7676f85ef9
Allow interface{} as key for JWT middleware argument ( #957 )
2017-06-19 15:42:27 -07:00
Vishal Rana
2d7cce4677
Updated godoc
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-15 08:44:21 -07:00
Vishal Rana
e1e3ebe5a1
Proxy middleware refactor
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-15 08:19:18 -07:00
Vishal Rana
e827c85dc5
Issue 950 ( #955 )
...
* Added implementation #950
Signed-off-by: Vishal Rana <vr@labstack.com>
* Added test for body-dump middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-14 23:03:38 -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
3673d7fb44
Enhanced proxy middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-06 15:01:13 -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
Vishal Rana
68b89eca6c
Updated godco for middleware/proxy
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-03 21:23:15 -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
a8cd0ad133
Closes #942
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-02 18:13:26 -07:00
Vishal Rana
b6a9836120
Moved casbin middlware to echo-contrib
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-02 10:19:56 -07:00
卜木
c73dd1f54c
Add an authorization middleware that supports ACL, RBAC based on casbin. ( #939 )
...
* Add an authorization middleware that supports ACL, RBAC based on casbin.
fix some coveralls check.
change test file with new rule.
renaming the prefix Authz to CasbinAuth
use built-in SetBasicAuth method in test file.
export all casbin auth configs.
* fix example code
2017-06-02 08:20:35 -07:00
Vishal Rana
466d509e34
Fixed #938
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-05-27 03:10:51 -07:00
Vishal Rana
cb9255e775
Using httptest
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-05-13 15:44:27 -07:00
aruhi
1827916e76
Add cookie tag for logger ( #921 )
...
Thanks for your contribution 🎉
2017-05-08 08:10:11 -07:00
Vishal Rana
5f392f3bb1
Signature changed for key and basic auth validator
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-04-18 15:40:28 -07:00
Vishal Rana
62ab217b8c
Static middleware: html5 mode skip any route with extension
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-04-08 13:17:13 -07:00
Michał Mrozek
895613fd40
Fixed skipper for static middleware ( #896 )
2017-04-03 21:25:20 -07:00
Diego Siqueira
d67c6f029c
Underscoring unnecessary variables on CSRF test ( #836 )
2017-04-01 09:29:12 -07:00
nownabe
cb6f0a5f80
Enable custom request id generator ( #881 )
2017-03-17 09:22:58 -07:00
Vishal Rana
9016770066
Fixed #873
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-03-10 16:10:07 -08:00
Vishal Rana
4d6ccce2b4
Fixed test
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-03-08 13:36:01 -08:00
Vishal Rana
4a9bc8c40e
Fixed static middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-03-08 12:18:00 -08:00
Vishal Rana
4b4a09fd31
Using random.String() for generating id
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-03-06 13:39:36 -08:00
Yusuke Komatsu
88b7cbb108
fix import cycle middleware
2017-03-06 13:39:36 -08:00