1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-18 16:20:53 +02:00
Commit Graph

1114 Commits

Author SHA1 Message Date
Guilherme Oenning
f8c3008787 Request: New bind property for route parameters (#973)
* bind route params

* rename to bindPathData
2017-07-25 07:22:19 -07:00
Rene Jochum
0769b34b52 Use the NotFoundHandler when a file haven't been found. (#966)
This is especialy usefull when you use e.Static("/", "static") and you
want a notfoundhandler that serves your index.html like this:

echo.NotFoundHandler = func(c2 echo.Context) error {
	index := filepath.Join(c.config.StaticDir, c.config.Index)
	_, err := os.Open(index)
	if err != nil {
		return echo.ErrNotFound
	}
	return c2.File(path.Join(c.config.StaticDir, c.config.Index))
}

Another usecase with the Handler above is HTML5 SPF applications.

One caveat, you need to make sure that your NotFoundHandler doesn't
produce loops.

Signed-off-by: Rene Jochum <rene@jochums.at>
2017-07-19 11:29:41 -07:00
Paul Tyng
a5c75b002d Fix issue with JWT race (#968) 2017-07-14 11:55:19 -07:00
Alexey Palazhchenko
d79c13108c Use latest released Go versions (#967) 2017-07-07 10:22:05 -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
c7531df815 Fixed build
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-28 19:08:45 -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
17c4df3e77 Fixed #444, closed #964
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-28 10:05:09 -07:00
Vishal Rana
e952538fec Update README.md 2017-06-28 09:17:02 -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
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
Nick Hudkins
7676f85ef9 Allow interface{} as key for JWT middleware argument (#957) 2017-06-19 15:42:27 -07:00
Vishal Rana
18ccbf35d8 Update README.md 2017-06-18 23:05:39 -07:00
Vishal Rana
ddd92db03b Update README.md 2017-06-18 22:39:58 -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
1e51b33509 Create ISSUE_TEMPLATE.md 2017-06-14 21:15:04 -07:00
Vishal Rana
1b70cbebbe Fixed #954
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-14 16:30:53 -07:00
Vishal Rana
ea352bedb6 Merge branch 'master' of https://github.com/labstack/echo 2017-06-12 10:40:08 -07:00
Vishal Rana
3fafadf895 Updated ci
Signed-off-by: Vishal Rana <vishal.rana@verizon.com>
2017-06-09 19:28:49 -07:00
Vishal Rana
7834248244 Updated ci
Signed-off-by: Vishal Rana <vishal.rana@verizon.com>
2017-06-07 11:48:06 -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
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
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
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
cb9255e775 Using httptest
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-05-13 15:44:27 -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
10809fad77 Fixed build
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-05-11 14:55:11 -07:00
Vishal Rana
33b4940cba Cookbook and website separated from the repo to echox
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-05-11 08:21:21 -07:00
Vishal Rana
1302a08009 Fixed #925
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-05-10 10:28:50 -07:00
Vishal Rana
5828f5f215 Updated website
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-05-10 08:52:45 -07:00
aruhi
1827916e76 Add cookie tag for logger (#921)
Thanks for your contribution 🎉
2017-05-08 08:10:11 -07:00
Vishal Rana
533d7a8dc1 Closes #918, docs updated for testing handler
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-04-29 11:02:57 -07:00
Vishal Rana
883fcb35fb Updated website
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-04-28 22:24:40 -07:00