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

60 Commits

Author SHA1 Message Date
Martti T
3598f295f9
Change type definition blocks to single declarations. This helps copy/pasting Echo code in examples. (#2606) 2024-03-09 07:53:07 -08:00
Martti T
a842444e8f
Add SPDX licence comments to files. See https://spdx.dev/learn/handling-license-info/ (#2604) 2024-03-09 11:21:24 +02:00
Martti T
7c7531002d
Clean on go1.20 (#2406)
* Fix tests failing on Go 1.20 on Windows. Clean works differently on 1.20. Use path.Clean instead with some workaround related to errors.
2023-02-22 00:00:52 +02:00
Daniel Price
a9879ffa6b Middlewares should use errors.As() instead of type assertion on HTTPError
- Helps consumers who want to wrap HTTPError, and other use cases
2022-07-21 21:24:18 +03:00
Lukas Dietrich
b643e6834e
Fix #1787: Add support for optional filesystem to the static middleware (#1797)
* Add optional filesystem to static middleware.
2021-05-08 22:33:17 +03:00
little-cui
1beaf09740 Bug Fix: Directory Traversal 2020-12-15 21:54:11 +08:00
Nenad Lukic
3206527cfe Adds IgnoreBase parameter to static middleware
Adds IgnoreBase parameter to static middleware to support the use case of nested route groups
2020-11-30 19:06:00 +01: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
Vishal Rana
38f27e229c Enhanced static browse
Signed-off-by: Vishal Rana <vr@labstack.com>
2018-04-11 21:41:18 -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
da083ffd0a Implemented rewrite middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-12-28 11:26:50 -08:00
Vishal Rana
c7531df815 Fixed build
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-06-28 19:08:45 -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
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
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
Vishal Rana
4a9bc8c40e Fixed static middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-03-08 12:18:00 -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
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
0daffa37ce Initial static middleware - #838
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-02-17 11:09:48 -08: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
17c8b8f2ea logger new api, updated recipes
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-23 13:37:04 -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
2aec0353f5 First commit to v3, #665
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-09-22 22:56:00 -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
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
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
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
041252cfc8 Fixed #496
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-01 06:56:52 -07:00
Vishal Rana
be825e0229 Refactored variable names
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-24 10:22:15 -07: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
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
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
1113413441 Defaults for middleware config
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-31 16:30:19 -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