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
Artyom Turkin
fcdf096c2c
extend proxy middleware. closes #1202 ( #1203 )
...
* extend proxy middleware. closes #1202
2018-10-09 09:13:39 +05:30
Vishal Rana
90822319eb
Fixed test
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-08-28 20:49:22 -07:00
Marcin Węglarz
74f9806b34
Fix issue #1143 ( #1176 )
2018-08-15 07:35:27 -07:00
Vishal Rana
db8f5706fd
Closed #1121
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-07-17 23:21:54 -07:00
Kesus Kim
09dcba1d39
rename proto to protocol
2018-07-10 23:06:17 -07:00
Kesus Kim
2a5460328f
add test case for logger middleware
2018-07-10 23:06:17 -07:00
Kesus Kim
146100093e
add proto field for middleware
2018-07-10 23:06:17 -07:00
Vishal Rana
d8a6dad02d
[JWT] use local error handler for missing token
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-07-09 11:36:25 -07:00
Vishal Rana
ec7b497940
Fixed cors test
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-07-03 09:51:15 -07:00
Jean-Sébastien Ney
8203e48696
add a few tests
2018-07-03 09:45:12 -07:00
Jean-Sébastien Ney
d63824fa41
handle using withcredentials and allow origin * together
2018-07-03 09:45:12 -07:00
Vishal Rana
9b4cc60ce2
Added error to logger middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-06-28 21:22:50 -07:00
Vishal Rana
61084e242e
JWT BeforeFunc, SuccessHandler & ErrorHandler
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-06-28 20:42:18 -07:00
Jeffrey Reuling (TI)
56091a4186
allow whitespace in regex
2018-06-26 09:57:59 -07:00
Vishal Rana
38f27e229c
Enhanced static browse
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-04-11 21:41:18 -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
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
Florian Holzapfel
9aafcaf934
fix: BodyLimit middleware: limitedReader Reset does not reset read counter
2018-03-16 09:48:23 -07:00
Jeffrey Reuling (TI)
ee32e3e7fb
fix issue #1086
2018-03-16 09:47:05 -07:00
ferhat elmas
3641cbcdad
Fix formatting ( #1071 )
2018-02-25 13:42:58 -08:00
Evgeniy Kulikov
6da0483447
[FIX] We must close gzip.Reader, only if no error ( #1069 )
...
* [FIX] We must close gzip.Reader, only if no error
* review comments fix
2018-02-23 11:32:27 -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
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
Yusuke Komatsu
d3d0ee6527
add id (Request ID) in logger format.
2017-03-06 13:39:36 -08:00
Yusuke Komatsu
f82701ebe9
remove debug print in request_id_test.go
2017-03-06 13:39:36 -08:00
Yusuke Komatsu
92b197d4b7
git add RequestID middleware
2017-03-06 13:39:36 -08:00
Vishal Rana
049518f8c4
Fixed static middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-02-23 12:27:48 -08:00
Vishal Rana
29fd5831ff
Fixed test
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-02-22 15:57:12 -08:00
Vishal Rana
d259f88324
Enabled security while serving static files
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-02-22 14:21:28 -08:00
Vishal Rana
91d2727522
Fixed #838
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-02-22 13:04:08 -08:00
Vishal Rana
6574bdf207
Updated docs
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-02-21 15:18:09 -08:00
nshmura
d28ea936d4
Add BasicAuth Realm support
2017-02-21 13:27:40 +09:00
Vishal Rana
a098bcd3b0
Updated docs
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-02-19 13:02:10 -08:00
Vishal Rana
0b53f397ad
Fixed static middleware - test
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-02-17 11:21:01 -08:00
Vishal Rana
0daffa37ce
Initial static middleware - #838
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-02-17 11:09:48 -08:00
Vishal Rana
7140e8395a
Using _fixture for testing
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-02-14 14:11:10 -08:00
Edward Muller
998c5de65f
Set the Content-Encoding header only when requested
...
Also if the Size == 0 unset the Content-Encoding header
2017-02-14 10:10:04 -08:00
Edward Muller
6f90742dec
Set the Content-Encoding header earlier for Static
...
Static uses ServeContent, which looks to see if the Content-Encoding
header is set or not to determine if it should set the Content-Length.
If Content-Length is set by something it will be wrong after the gzip
compression happens and stricter routers (and tools like curl) will
have problems with the request.
Fixes #806
2017-02-13 19:12:58 -08:00
Diego Siqueira
a8b6864be3
Two little typos on comments ( #835 )
2017-02-02 11:50:17 -08:00
Vishal Rana
52fa135fd5
Updated docs, exposed middleware.DefaultSkipper
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-28 11:46:43 -08:00
Vishal Rana
7025f55cab
Error for non 443 port for auto tls
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-23 15:39:19 -08:00
Vishal Rana
17d66313ff
Merge branch 'master' of https://github.com/labstack/echo
2017-01-21 10:21:02 -08:00
Vishal Rana
e8910be0ac
Updated deps and docs
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-21 10:20:59 -08:00
Peter Fern
8cd3cb043b
logger: Don't copy lock value in LoggerConfig.pool, use a pointer ( #825 )
...
Fixes #710 `go vet` failures
2017-01-21 10:18:34 -08:00
Vishal Rana
736d153c29
Startup banner
2017-01-14 12:49:58 -08:00
Vishal Rana
8526358e8a
Fixed logger middleware error return
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-12 16:08:12 -08:00
Vishal Rana
f56450d8ce
Fixed #821
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-12 09:09:51 -08:00
Vishal Rana
0696d55586
Updated logger docs
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-11 21:02:34 -08:00
Vishal Rana
ce6b1e20db
Logger middleware interface ( #820 )
...
* Modified logger format
Signed-off-by: Vishal Rana <vr@labstack.com>
* Logger middleware via struct
Signed-off-by: Vishal Rana <vr@labstack.com>
* Fixed time format
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-11 20:07:51 -08:00
Vishal Rana
9fe724dedb
Fixed #802 , closes #773
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-05 12:38:39 -08:00
Vishal Rana
4cbef06bef
Fixed basic auth middleware, closes #799
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-05 12:12:31 -08:00
Vishal Rana
ee2ac3b9a2
Key auth validator now accepts context
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-03 20:48:21 -08:00
Vishal Rana
97c680662d
Fixed key auth middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-02 23:09:46 -08:00
Vishal Rana
412823eabb
Added key auth middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-02 20:12:06 -08:00
Vishal Rana
869cdcd19a
Dropped Response#Writer/SetWriter functions
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-12-21 18:56:35 -08:00
Vishal Rana
d9a6052c67
Closes #489 , Closes #781 , Updated docs
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-12-20 23:13:46 -08:00
Vishal Rana
562021ed2d
fixed #781
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-12-20 13:58:45 -08:00
Vishal Rana
f5f75122ba
fixed #750
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-12-19 11:43:24 -08:00
Vikram Sreekumar
23176c639e
jwt-authscheme: support for custom jwt auth scheme
...
- added "AuthScheme" in the JWTConfig and set default value to
"Bearer".
- added test case for validating JWT Auth with a custom auth
scheme.
2016-12-19 11:39:31 -08:00
Vishal Rana
5706940bc8
HTTPError#Message is now interface
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-12-10 22:05:41 -08:00
Michael Köppl
f0b235c108
Fix typo ( #767 )
2016-12-09 09:05:40 -08:00
Vishal Rana
fe269b3e1c
fixed ##743
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-11-21 14:42:13 -08:00
Vishal Rana
2f70d3e1c7
fixed #712
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-11-12 20:34:52 -08:00
Vishal Rana
d832efd403
cors: not checking for origin header
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-11-12 14:05:41 -08:00
Antonio Pagano
4f1aef1469
Allows LoggerConfig to add new header, form, path and query tags ( #708 )
...
* [feature] implementing new log configuration tags for headers, form, query and path
* [refactor] merging all tests and removing path from the tags available for the logger
* [doc] updating middleware logger doc
* [tests] adding test cases for the other tags on the logger template
* [cleaning] moving h reference on tests to be a direct assignment given we dont need the reference to h anymore
2016-11-02 13:08:51 -07:00
Vishal Rana
cd36c4f813
fixed https://github.com/labstack/armor/issues/13
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-31 16:08:53 -07:00
Vishal Rana
c978ff6431
Removed static middleware in favor of Echo#Static
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-25 15:18:15 -07:00
Vishal Rana
2fbaf3a363
minor refactor, #677
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-25 08:08:46 -07:00
Vishal Rana
17c8b8f2ea
logger new api, updated recipes
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-23 13:37:04 -07:00
Vishal Rana
0f219b59ec
fixed https://github.com/labstack/armor/issues/12
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-22 17:23:15 -07:00
Vishal Rana
4760f4cedf
fixed recipes for static middleware change
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-22 16:38:01 -07:00
Vishal Rana
166a24fe23
static middleware strip prefix config
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-22 15:22:18 -07:00
Vishal Rana
954efac63a
fixed #684
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-22 15:18:55 -07:00
Vishal Rana
2eb87f8036
param wildcard capture fixed to *
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-10 18:36:48 -07:00
Vishal Rana
8623669cbc
removed Context#P()
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-10 18:22:13 -07:00
Vishal Rana
2507dc13e9
website and recipe in the main repo
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-01 20:49:22 -07:00
Vishal Rana
ef584add8c
Enhanced redirect middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-09-28 10:26:02 -07:00
Vishal Rana
dd22cf9593
Updated deps
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-09-25 11:41:08 -07:00
Vishal Rana
1f1b211328
Fixed body-limit middleware test
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-09-22 23:01:46 -07:00
Vishal Rana
2aec0353f5
First commit to v3, #665
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-09-22 22:56:00 -07:00
Vishal Rana
862bee4ebd
Fixed #647 , fixed #656
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-09-14 15:37:21 -07:00
Vishal Rana
e980bd9055
Closes #647
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-09-07 12:18:57 -07:00
Vishal Rana
4850d69c30
Fixed basic-auth middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-09-05 10:20:10 -07:00
Vishal Rana
3d9d408365
Options for redirect middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-08-31 20:10:14 -07:00
Vishal Rana
86ae297e23
New redirect middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-08-27 13:03:40 -07:00
Vishal Rana
6dab126f64
Fixed godoc
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-08-27 10:58:33 -07:00
Vishal Rana
bc7b992d23
Dropped custom error handler for jwt, closes #589 , closes ##591
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-08-27 10:54:51 -07:00
Vishal Rana
98061d3ce3
Closes #633
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-08-21 09:52:20 -07:00
Vishal Rana
87dbea59f7
Minor refactor and format
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-08-20 09:35:19 -07:00
matcornic
2557d33c4b
Closes #631
2016-08-20 17:59:36 +02:00
ipfans
0b7959a57d
Rename RemoteIP to RealIP
2016-08-18 09:26:58 +08:00
Vishal Rana
27f9b326b8
Ability to skip a middleware via callback
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-07-27 09:34:44 -07:00
Vishal Rana
579cb79a41
Using random string from gommon
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-07-18 23:24:50 -07:00
Vishal Rana
0dab439ea4
Fixed #600
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-07-16 20:13:27 -07:00
Vishal Rana
c1358eda73
Generate CSRF token only if it is expired ( #601 )
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-07-16 10:22:24 -07:00
Vishal Rana
98d744b8fb
Fixed #597 ( #598 )
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-07-13 16:55:46 -07:00
Przemek Komosa
a8b48af608
Read JWT from cookie
...
Note: writing token to cookie is out of scope of this middleware
(exactly as in other reading methods).
2016-07-02 11:26:05 +02:00
Przemek Komosa
ae09482493
Add HandleEmptyToken to JWT middleware
...
Now it is possible to add custom handler for missing JWT.
2016-07-02 00:55:11 +02:00
Przemek Komosa
bb6baa2088
Add JWT tests for _query_ method
2016-07-02 00:28:56 +02:00
Przemek Komosa
4b6811e0cf
Refactor JWT tests to table based
...
Now state isn't shared.
2016-07-02 00:28:56 +02:00
Vishal Rana
d119b3bbfa
Fixed #584
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-06-28 17:38:12 -07:00
Vishal Rana
fbcdf70c52
Update JWT lib to v3
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-06-16 14:40:43 -07:00
Vishal Rana
f4088cf594
Added JSON logging
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-06-08 17:16:03 -07:00
Vishal Rana
c654c422c4
More coverage and better response adapter for standard/response
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-06-06 22:27:36 -07:00
Vishal Rana
74c8e254ff
Fixed docs
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-06-05 10:29:23 -07:00
Russ Egan
348edc31c6
fix index out of bounds if path is empty
2016-05-31 22:12:14 -04:00
anger
9225ce0f18
Add PATCH to default allowed methods
2016-05-31 15:41:09 +03:00
Vishal Rana
dc244c173d
Minor fix in jwt and csrf middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-26 19:23:46 -07:00
Vishal Rana
7e52ad4dd5
Changes to jwt and csrf middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-26 14:08:02 -07:00
Vishal Rana
b8c52b0432
Default config for static middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-23 11:31:25 -07:00
Vishal Rana
08a173b476
Enhanced body-limit middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-23 11:23:15 -07:00
Vishal Rana
ecb021f830
HTML5 mode in static middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-22 10:21:19 -07:00
Vishal Rana
702e6d0967
Closes #517 , closes #518
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-22 07:58:21 -07:00
Vishal Rana
c6b32d5541
Added json tags to middleware config
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-18 18:53:54 -07:00
Vishal Rana
7d1819e5b1
Extractor for csrf token
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-13 08:18:00 -07:00
Vishal Rana
1aa22ce09b
Updated docs
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-12 18:14:00 -07:00
Vishal Rana
98dd8bf9e9
Added CSRF middleware, #341 .
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-12 17:45:00 -07:00
Vishal Rana
1afaa6ec0b
Updated docs, changes to static middleware config
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-10 11:52:04 -07:00
Vishal Rana
799c6cff2a
Upgraded gommon
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-10 08:59:55 -07:00
Vishal Rana
c4d6f16fc4
More tags in logger middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-10 07:57:35 -07:00
Vishal Rana
6b55156cb6
Fixed build
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-09 19:19:53 -07:00
Vishal Rana
ef1d00349e
Fixed #505
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-09 19:13:02 -07:00
Vishal Rana
e943ed24be
JWTAuth to JWT
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-07 07:45:03 -07:00
Vishal Rana
986338c805
Update README
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-04 23:33:05 -07:00
Vishal Rana
d81956058e
Update README with secure middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-03 11:42:42 -07:00
Vishal Rana
6424d779dc
Added test for secure middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-03 08:32:28 -07:00
Vishal Rana
f0526349ff
Fixed #499
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-02 22:41:07 -07:00
Vishal Rana
c31a524d05
Merge branch 'middleware-secure-header' of https://github.com/coderhaoxin/echo into coderhaoxin-middleware-secure-header
2016-05-02 20:21:26 -07:00
Vishal Rana
cb752141f2
Add form binding
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-01 12:38:51 -07:00
Vishal Rana
041252cfc8
Fixed #496
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-01 06:56:52 -07:00
Vishal Rana
b53170ace1
Updated readme
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-30 22:29:07 -07:00
Vishal Rana
368f2ab67e
Fixed fasthttp Request#SetBody
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-30 21:56:35 -07:00
Vishal Rana
0edb17e978
Added body limit middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-30 20:08:06 -07:00
Vishal Rana
a708a6781a
Fixed basic auth to return 401 for error cases
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-28 07:09:33 -07:00
haoxin
e2faa6c2be
middleware: add basic secure headers
2016-04-28 14:12:57 +08:00
Vishal Rana
bca2fd450e
Updated readme
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-27 22:03:54 -07:00
Vishal Rana
24a19223b0
Added method override middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-27 21:08:30 -07:00
Vishal Rana
7f819e4d71
Merge branch 'method' of https://github.com/coderhaoxin/echo into coderhaoxin-method
2016-04-27 19:14:24 -07:00
Vishal Rana
fb8690d42b
Fixed #488
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-26 02:10:57 -07:00
Vishal Rana
13648d06f3
Updated README.md with JWT middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-25 13:41:44 -07:00
Vishal Rana
02676bdb44
Added JWT middleware
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-25 10:58:11 -07:00
Vishal Rana
be825e0229
Refactored variable names
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-24 10:22:15 -07:00
haoxin
592790bb43
middleware: add method override
2016-04-24 21:07:55 +08:00
zjx20
496ea19a80
Atomically write logs in the Logger middleware
2016-04-22 19:05:49 +08:00
Vishal Rana
c830734fd5
Fixed static middleware serving index.html
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-21 22:25:51 -07:00
Vishal Rana
1247552c9b
Fixed https://github.com/labstack/echox/issues/9
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-20 07:32:51 -07:00
Vishal Rana
1c2d6341ba
Fixed #474
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-18 16:59:58 -07:00
Vishal Rana
ce80fc8ea4
Fixed middleware test cases
...
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-16 16:02:22 -07:00