1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-21 05:12:40 +00:00

157 Commits

Author SHA1 Message Date
ReneWerner87
b51def0bb8 🐛 UnescapePath not working #1102
Co-authored-by: Fenny <fenny@gofiber.io>
2021-01-06 13:21:54 +01:00
Kiyon
a5a50ab020 👷 Remove redundant validation of CacheDuration when checking static config 2020-12-10 15:32:06 +08:00
Fenny
0d5519fc09 expose CacheDuration in Static 2020-11-11 14:18:19 +01:00
kiyon
4c89377631 🩹 Fix #945 2020-10-21 14:50:33 +08:00
Roman
3e6dfb313b 🔥set a Cache Control header for static ressources
Right now, each static request returns the file without any cache control
header. If you are using `app.Static` to serve your assets, the
browser shouldn't cache it. This PR introduces a way to set the cache
control header (if the file was found) on the file response to set a
custom max-age to e.g. cache it 1 year.
2020-10-07 15:44:38 +02:00
Fenny
3b5997a3df 🔨 fix mount tree build
Co-Authored-By: RW <7063188+ReneWerner87@users.noreply.github.com>
2020-09-26 13:46:14 +02:00
Fenny
e414c4a83e 🗻 able to mount sub-apps 2020-09-26 11:24:25 +02:00
Fenny
ec5d20b1dc Merge remote-tracking branch 'upstream/master' 2020-09-22 12:32:43 +02:00
kiyon
dba73ea45e 🧹 pass ErrMethodNotAllowed to handler 2020-09-21 08:45:17 +08:00
Fenny
2b72fd2162 🩹 ignore trailing slash with static directories 2020-09-20 21:48:45 +02:00
ReneWerner87
c822a17c72 ☠️ Improve error handling flow
Co-authored-by: Fenny <fenny@gofiber.io>
Co-authored-by: Kiyon <kiyon@gofiber.io>
2020-09-18 20:44:00 +02:00
Fenny
2768ea2a77 🙌 make utils public
Co-Authored-By: RW <7063188+ReneWerner87@users.noreply.github.com>
2020-09-14 12:12:29 +02:00
Fenny
a3cac71ae8 🔦 move utils to internal 2020-09-14 09:09:06 +02:00
Fenny
ec5d66e7a8 v2 2020-09-13 11:20:11 +02:00
ReneWerner87
ad7f4df9a7 🦟 Fix star routes 2020-09-02 20:59:42 +02:00
ReneWerner87
2c6d7e00c4 🌵hybrid routing with tree and fast router 2020-08-10 10:54:41 +02:00
ReneWerner87
df3c48a734 🌵hybrid routing with tree and fast router 2020-08-10 10:51:38 +02:00
ReneWerner87
945b61d1c3 🌵hybrid routing with tree and fast router 2020-08-09 21:53:15 +02:00
kiyon
cf22aa2ae5 🩹 handle invalid http method 2020-07-24 22:55:57 +08:00
Fenny
396b6ddebc 🗑️ Remove pos from Route
Co-Authored-By: RW <renewerner87@googlemail.com>
Co-Authored-By: kiyon <kiyonlin@users.noreply.github.com>
2020-07-22 02:07:57 +02:00
ReneWerner87
b34a77bc96 💉 Sync route method metadata
Co-authored-by: Fenny <fenny@gofiber.io>
2020-07-21 23:30:52 +02:00
Fenny
f681e2676f 🗑️ Deprecate app.Routes, introduce app.Stack
Co-Authored-By: RW <renewerner87@googlemail.com>
Co-Authored-By: kiyon <kiyonlin@users.noreply.github.com>
2020-07-21 22:50:46 +02:00
wernerr
b9bdc0d4a8 🚀 compress same route's handler 2020-07-20 19:29:54 +02:00
kiyon
174eb0e33d 🚀 compress same route's handler and sort routes when registering 2020-07-20 21:43:01 +08:00
Fenny
f9e6ea8103 🖇 Cleanup router chaining 2020-07-19 13:36:26 +02:00
ReneWerner87
1b2d3d92c4 🔗Allow route method chaining
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/express-serve-static-core/index.d.ts#L119-L126
2020-07-19 10:04:21 +02:00
Fenny
da85c85c14 🧪 Increase test coverage: 96% 2020-07-15 17:43:30 +02:00
renanbastos93
e070968d2d 🚀 refactor: change status code number to constant 2020-07-14 00:55:41 -03:00
kiyon
2cfc1b1546 👷 Extract "USE" to a global const variable 2020-07-12 23:54:22 +08:00
kiyon
9b14fc78d1 💡 add ctx.matched to determine if request matched a non USE route. 2020-07-08 22:40:44 +08:00
ReneWerner87
d2e85a1eea 🚀 Better performance for MethodNotAllowed process 2020-07-08 13:42:10 +02:00
kiyon
ce3d44613c 🔧 fix #556 remove ctx.matched things 2020-07-07 23:25:02 +08:00
Fenny
964f3c59ae 🔨 Make Params available in Route 2020-07-05 11:17:42 +02:00
Fenny
34ac831143 Add json formatting 2020-07-02 20:26:38 +02:00
Fenny
909c683e12 Improve routing calculation 2020-06-30 00:27:28 +02:00
ReneWerner87
d57651835b improve routing performance 2020-06-29 22:51:41 +02:00
Fenny
85d7a6add4 Support Naming Routes 2020-06-25 16:24:21 +02:00
Fenny
c0f26798a8 Update router.go 2020-06-21 10:47:11 +02:00
Fenny
3187472744 Update router.go 2020-06-20 17:27:40 +02:00
Fenny
44d739496d Add 405 Method Not Allowed 2020-06-20 17:26:48 +02:00
kiyon
437064e0c6 Abstract Router interface for App and Group. 2020-06-17 15:09:08 +08:00
Fenny
abbd18d815 Add CompressedFileSuffix 2020-06-07 20:35:41 +02:00
Fenny
3580b47b6e 🩹 Fix Golint 2020-06-06 07:35:12 +02:00
Fenny
ba67287a89 📋 Add route position 2020-06-06 07:31:01 +02:00
wernerr
53d79ca070 fix static routing for index.html 2020-06-03 21:35:49 +02:00
Fenny
64d74e840a Hot fix fasthttp bug 2020-06-03 17:16:10 +02:00
fenny
2f402a5495
Merge pull request #434 from ReneWerner87/master
Fix a problem when matching the static routes
2020-06-02 17:57:05 -04:00
wernerr
5fe772f48a Fix a problem when matching the static routes 2020-06-02 23:25:06 +02:00
Fenny
027823e084 Return 404 if Next does not match 2020-06-01 13:45:04 +02:00
Fenny
f9c08818ed Return 404 if Next does not match 2020-06-01 13:36:51 +02:00