1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-22 20:06:21 +02:00
Commit Graph

483 Commits

Author SHA1 Message Date
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
Vishal Rana
11eafe9b90 Fixed slash middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-13 13:48:33 -07:00
Vishal Rana
909f6dacf3 Update docs
Signed-off-by: Vishal Rana <vishal.rana@verizon.com>
2016-04-13 13:28:13 -07:00
Vishal Rana
b9aa2181b0 Trailing slash middleware with option to redirect
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-12 22:39:29 -07:00
Victor Gaydov
f8117ac7b3 Properly disable colors in Logger middleware
Fix bug when colours are enabled if non-os.File writer is used as
output io.Writer.
2016-04-11 13:46:59 -07:00
Vishal Rana
130c548826 Closes #459, #457.
- Static back as middleware

Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-10 20:56:10 -07:00
Vishal Rana
33700bfcc2 Fixed #457
- Dropped static middleware in favor of Echo#Static & Echo#StaticConfig.
- Enhanced middleware chaining.

Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-09 14:00:23 -07:00
Vishal Rana
1a7bc677da API changes from to with
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-07 21:20:50 -07:00
Vishal Rana
a8cf473ee7 Updated README.md with CORS middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-07 16:58:56 -07:00
Vishal Rana
a3352d880c Fixed #454, Fixed #274
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-07 16:16:58 -07:00
Vishal Rana
e37b54e73f Removed a print statement
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-06 11:07:56 -07:00
Vishal Rana
8b5772cf65 Proper header and MIME constants
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-06 07:29:47 -07:00
Vishal Rana
adad28012c Default bool config as false for middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-05 18:57:57 -07:00
Vishal Rana
2dc1d53da5 Fixed #446
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-04 22:49:14 -07:00
Vishal Rana
b5d6c05101 Fixed #441, #294
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-02 14:24:51 -07:00
Vishal Rana
be5148ae27 Gzip fix #437
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-01 15:44:09 -07:00
Vishal Rana
1113413441 Defaults for middleware config
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-31 16:30:19 -07:00
Vishal Rana
1b3197a149 Middleware to add and remove trailing slash
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-31 12:38:48 -07:00
Vishal Rana
ba46c48cba Enhanced static middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-31 08:41:02 -07:00
Vishal Rana
28ec39daaa Context#StaticContent signature changed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-27 21:03:35 -07:00
Vishal Rana
a2d757eddc Closes #434
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-27 16:29:41 -07:00
Vishal Rana
16c6f478b1 Updated README.md
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-27 10:25:31 -07:00
Vishal Rana
3a67c062de Updated godoc
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-23 23:05:01 -05:00
Vishal Rana
910315ec5f Updated godoc
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-22 22:56:29 -05:00
Vishal Rana
a66162a3d2 Logging middleware fixes
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-21 17:27:14 -07:00
Vishal Rana
b47abdb9ec Fixed #424, #427
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-20 08:14:55 -07:00
Vishal Rana
576dfeb71d Close gzip writer
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-19 16:17:43 -07:00
Vishal Rana
c4caeb8ffb more godoc
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-19 15:47:20 -07:00
Vishal Rana
d01e856db6 Closes #423
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-19 08:38:35 -07:00
Vishal Rana
830b4eff3f Some work on logger middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-18 22:25:11 -07:00
Vishal Rana
4a86175a32 Logger format
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-18 20:40:41 -07:00
Vishal Rana
abf389f91a #410, actually timestamp.
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-18 20:29:53 -07:00
Vishal Rana
4d30b193ad #410, actually timestamp.
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-18 20:02:02 -07:00
Vishal Rana
e159f4d7ef Making Echo#Pre actually work.
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-17 13:24:52 -07:00
Vishal Rana
00bf0d651f Enhanced recover middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-14 16:14:33 -07:00
Vishal Rana
5b5df5bf44 Last-Modified header for static content
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-12 10:18:40 -08:00
Vishal Rana
082814c776 Fixed #387
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-12 05:14:15 -08:00
Vishal Rana
7263e50e10 Fixed #389 2016-03-12 03:54:54 -08:00
Vishal Rana
09f3d3061f Closes #314
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-11 07:53:54 -08:00
Vishal Rana
25e72d623e Fixed recover and gzip middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-10 16:35:20 -08:00
Vishal Rana
8ee864ae08 Dropped Engine**#Object functions
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-10 12:05:33 -08:00
Vishal Rana
34e964851f Closes #283
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-08 19:40:25 -08:00
Vishal Rana
296498c942 Fixed nested groups, reset Context#handler
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-08 19:31:11 -08:00
Vishal Rana
569d72cd76 Fixed import cycle
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-06 16:43:47 -08:00
Vishal Rana
e1d789ecbb Logger as not an interface
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-06 09:52:32 -08:00
Vishal Rana
12e2c74eda Content type for static middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-25 11:44:41 -08:00
Vishal Rana
4f6fd9725d Fixed default options for static
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-20 12:22:09 -08:00
Vishal Rana
19d51dad4c Static as middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-18 22:50:40 -08:00
Vishal Rana
c0873843ad Option to options
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-18 07:00:51 -08:00
Vishal Rana
88f307bedd Middleware and handler as closure
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-17 21:49:31 -08:00
Vishal Rana
c9a62e20b4 Middleware as structs
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-17 21:18:46 -08:00
Vishal Rana
51acf465fe - Moved static file serving to a new handler package
- Middleware at route level
- Group middleware is a in closure now

Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-15 08:11:29 -08:00
Vishal Rana
7b843e66c5 Wrappers for handler and middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-08 22:17:20 -08:00
Vishal Rana
3cd1d5be65 Fixed sync.Pool
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-08 17:26:00 -08:00
Vishal Rana
65fcca2ce3 Middleware interface
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-07 23:02:37 -08:00
Vishal Rana
f27de9a804 Fixed logging
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-04 19:29:49 -08:00
Vishal Rana
f405794a7c Now using sync.Pool
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-04 14:40:08 -08:00
Vishal Rana
688293b5ed v2 is compiling now
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-01-28 23:46:11 -08:00
Vishal Rana
dbd1e8e230 Separated recipes from the main repo
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-01-09 11:00:13 -08:00
Vishal Rana
33d8813eb5 Revert "Revert "Fixed Request.Out""
This reverts commit 72050d765b.
2015-12-21 15:20:49 -08:00
Vishal Rana
72050d765b Revert "Fixed Request.Out"
This reverts commit cced590a16.
2015-12-21 15:18:53 -08:00
Vishal Rana
cced590a16 Fixed Request.Out
Signed-off-by: Vishal Rana <vishal.rana@verizon.com>
2015-12-21 15:18:03 -08:00
Vishal Rana
0884290766 Added X() method to return context
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-12-04 08:13:26 -08:00
Vishal Rana
72459fe299 Step towards v2
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-12-03 17:23:53 -08:00
Vishal Rana
9650c39055 Bumped to v1.3
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-12-01 15:06:18 -08:00
Vishal Rana
4f996419e1 Fixed #255
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-11-20 19:39:35 -08:00
Vishal Rana
143f563734 Moved code around
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-10-21 15:11:01 -07:00
Mark Bates
b02e78b749 Fixed bug where IP address wasn't showing up in log files. Also added
some tests for the Logger middleware.
2015-10-21 16:39:51 -04:00
Ben Huson
799f01a87b Adding IP Addresses in log entries
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-09-18 11:07:43 -07:00
Vishal Rana
eef1574969 go fmt ./...
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-09-15 13:20:59 -07:00
Vishal Rana
3bd10bd651 Refactored debug mode api
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-09-13 10:34:15 -07:00
Tyler Bunnell
1d040969ad Merge branch 'master' of https://github.com/labstack/echo 2015-09-11 16:24:26 -06:00
Tyler Bunnell
4f3335aac7 Add sync.Pool to gzip middleware 2015-09-11 16:23:57 -06:00
Vishal Rana
9db442492a Moved auth header outside of the block
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-09-01 12:09:08 -07:00
Vishal Rana
e0a40f864c Merge pull request #192 from labstack/issue-180
Closes #180
2015-09-01 11:32:12 -07:00
Vishal Rana
8aaf620c2d Closes #180
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-09-01 11:24:36 -07:00
Vishal Rana
507c69ec80 StripTrailingSlash is now an option
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-09-01 08:03:01 -07:00
Vishal Rana
b4da73313f Removed RedirectToSlash middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-07-28 15:26:17 -07:00
axdg
35d018c671 Removed JWT middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-07-05 11:32:37 -07:00
Chase Hutchins
50fb7e0050 More coverage for compress middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-06-26 21:24:14 -07:00
Chase Hutchins
356909c49e Content type sniffing for compress middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-06-24 15:36:05 -07:00
Vishal Rana
45a7e7d6f2 Closed #71
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-06-09 20:06:51 -07:00
Vishal Rana
ae721bd2b2 Bug in gzip, fixed #95, #96.
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-06-09 15:24:01 -07:00
Vishal Rana
1ac5425ec4 Fixed #95
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-06-09 09:16:52 -07:00
Vishal Rana
0edb31b3bd Updated website
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-06-07 19:57:49 -07:00
Vishal Rana
b9eec15c01 More test coverage
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-30 15:20:36 -07:00
Vishal Rana
a9e49e2430 Total coverage for middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-30 10:54:55 -07:00
Vishal Rana
76e9b44190 Exposed DefaultHTTPErrorHandler function
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-28 16:50:49 -07:00
Vishal Rana
e0364caf36 Better handling in middleware for WebSocket
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-22 20:26:52 -07:00
Vishal Rana
bf85c56b08 Encapsulated fields and exposed public functions.
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-22 04:40:01 -07:00
Vishal Rana
6f728d428d Added test from Echo.WebSocket()
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-21 22:48:34 -07:00
Vishal Rana
cfd6d8b77f Better HTTP status in basic auth middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-21 14:02:29 -07:00
Vishal Rana
a4375c4991 Fixed examples with new HandlerFunc changes
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-20 15:59:36 -07:00
Vishal Rana
13ac746093 Refactored Echo.HandlerFunc, added WebSocket support.
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-20 14:38:51 -07:00
Vishal Rana
60a377a7f3 Fixed debug call
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-19 18:59:05 -07:00
Vishal Rana
5d636c1eb1 Updated docs
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-18 13:38:35 -07:00
Vishal Rana
73fa05f826 Added panic recover middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-17 22:54:29 -07:00
Vishal Rana
609879bf39 Refactored tests
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-16 12:49:01 -07:00
Vishal Rana
d90395cf2b Using int64 instead of uint64 for response size
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-15 15:24:47 -07:00
Vishal Rana
1ee3bc23e3 Added gzip middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-15 12:29:14 -07:00
Vishal Rana
f5a385b547 Middleware with options
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-14 16:25:49 -07:00
Vishal Rana
58ed17d35e Update slash.go 2015-05-13 23:09:02 -07:00
Vishal Rana
54cad1ff14 Added slash middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-13 23:07:03 -07:00
Vishal Rana
e55f5f1636 Invalid auth test case
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-12 06:28:25 -07:00
Vishal Rana
0da05cb7f2 Updated auth test
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-12 06:18:49 -07:00
Vishal Rana
ac323178df Added http basic auth example
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-11 20:51:34 -07:00
Vishal Rana
69a97671ad Adding http basic authentication middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-11 15:43:54 -07:00
Vishal Rana
f80fff4efb issue #50
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-05-05 21:55:49 -07:00
Vishal Rana
eee38a6376 Fixed #35
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-04-24 15:13:06 -07:00
Ilia Gavrilin
8ec563ed38 fix name in middleware package 2015-04-23 11:44:50 +03:00
Vishal Rana
dd40c15746 Moved middleware in a package
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-04-20 23:24:57 -07:00
Vishal Rana
3eeea660fa Dropped support for func(http.Handler) http.Handler middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-04-19 16:00:23 -07:00
Vishal Rana
141b4302ae Created a website #29
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-04-18 21:53:38 -07:00
Vishal Rana
381fbae1ff Default handler now returns error.
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-04-18 16:47:48 -07:00
Yasuhiro Matsumoto
22f3cd37ff colorful logger on windows 2015-03-31 12:35:53 +09:00
Vishal Rana
064a69d1dc New name for repo
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-03-27 14:21:30 -07:00
Vishal Rana
e49e74aeac Flexible handler and middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-03-25 08:50:24 -07:00
Vishal Rana
99124cda0a Wrap method for using third party middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-03-21 14:59:09 -07:00
Vishal Rana
40330ae7c0 Middleware example
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-03-12 20:50:33 -07:00
Vishal Rana
d9cb0d8a18 Using new color package
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-03-12 15:46:02 -07:00
Vishal Rana
7c9a0b6489 initial commit
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-03-01 09:45:13 -08:00