Commit Graph

402 Commits (167a8b5e9421e0ab51fbf44c5621632f4a1a90c5)

Author SHA1 Message Date
leonklingele 167a8b5e94
🚀 Feature: Add and apply more stricter golangci-lint linting rules (#2286)
* golangci-lint: add and apply more stricter linting rules

* github: drop security workflow now that we use gosec linter inside golangci-lint

* github: use official golangci-lint CI linter

* Add editorconfig and gitattributes file
2023-01-27 09:01:37 +01:00
RW c13a7e3918
prepare release v2.41.0 2023-01-03 15:31:22 +01:00
pj 8889cea116
feat: add ShutdownWithTimeout function (#2228)
* add ShutdownWithTimeout function

* no message

* fix func documentation

* test: add Test_App_ShutdownWithTimeout

Co-authored-by: rocketlaunchr-cto <rocketlaunchr.cloud@gmail.com>
Co-authored-by: kinggo <lilong.21@bytedance.com>
2022-12-19 23:40:43 +08:00
kinggo a9ddef7a20
optimize: add more detail error message in serverErrorHandler (#2267) 2022-12-11 02:28:39 +08:00
leonklingele d9d2153fcc
🩹 Fix: Properly handle error of "net.ParseCIDR" in "(*App).handleTrustedProxy" (#2243)
* app: do not use empty *net.IPNet in case of an error of "net.ParseCIDR"

* app: expose error returned by "net.ParseCIDR"

* ctx: do not repeatedly call method in loop

* ctx: add test for "IsProxyTrusted" func
2022-12-05 08:27:51 +01:00
RW 8952d170fe
prepare release v2.40.1 2022-11-23 09:05:31 +01:00
RW 0d038cba46
fix typo 2022-11-21 08:54:34 +01:00
RW c8baa613ae
prepare release v2.40.0 2022-11-18 16:21:47 +01:00
Caleb Case 61b4496067
Track Configured Values (#2221)
* WIP: Use Parent Error Handler on Mount

* Add suggested boolean guard

* Move flag to App

* Move to copy of config as configured

* Apply the same trick to customMethod
2022-11-15 12:13:11 +01:00
M. Efe Çetin 8aeb147c75
feature: add multiple-prefix support to app.Use() and group.Use() (#2205) 2022-11-13 16:56:34 +01:00
Rafi Muhammad 878c9549d8
Feat: Register custom methods (#2107)
* Implementing register custom methods

* Return timout time to 1000

* Update app_test.go

* Change update stack to add custom request method

* Feat: Register custom methods #2107

* Feat: Register custom methods #2107

* update logic

* optimization.

* fix

Co-authored-by: Rafi Muhammad <rafi.muhammad@mekari.com>
Co-authored-by: RW <rene@gofiber.io>
Co-authored-by: Muhammed Efe Çetin <efectn@protonmail.com>
2022-11-11 08:23:30 +01:00
M. Efe Çetin 581af0052d
🐛 bug: fix naming of routes inside groups (#2199)
* 🐛 bug: fix naming of routes inside groups

* fix tests

* bug: fix naming of routes inside groups

Co-authored-by: René Werner <rene@gofiber.io>
2022-11-09 16:03:16 +01:00
M. Efe Çetin 156b81c768
🐛 bug: improve mounting behavior (#2120)
* 🐛 bug: fix mounting doesn't work if when to declare it before routes

* 🐛 bug: fix mounting doesn't work if when to declare it before routes

* 🐛 bug: fix mounting doesn't work if when to declare it before routes

* 🐛 bug: fix mounting doesn't work if when to declare it before routes

* 🐛 bug: fix mounting doesn't work if when to declare it before routes

* add onMount hooks, mountPath like express.js, better behavior for onName, onRoute, onGroup, onGroupName hooks on mounted apps

* add comment

* use once

* fix views when both app and sub-app have view engine, better behavior for mount path

* fix tests

* fix tests

* make some tasks

* make some tasks
2022-10-25 07:51:44 +02:00
RW 5b1885a44c
prepare release 2.39.0 2022-10-23 10:01:35 +02:00
José Roberto Vasconcelos 917c937c76
[Bug] Fix query string parameter pass to fiber context (#2164)
* Remove dump to keep querystring param when test

* Remove unused import
2022-10-20 20:42:06 +02:00
Nathan Faucett 6a5fc64edd
add CacheControl to Static config (#2140)
* add CacheControl to Static config

* change config name to ModifyResponse

Co-authored-by: Nathan Faucett <nfaucett@utility.com>
2022-10-05 18:14:37 +02:00
kinggo ff348b5e92
feat: Add GetRoutes (#2112)
feat: Add GetRoutes
2022-09-27 09:02:38 +02:00
RW cc1e9bf115
prepare release v2.38.1 2022-09-26 13:21:16 +02:00
RW d1778f381a
prepare release v2.38.0 2022-09-26 13:20:25 +02:00
Amir Hossein 6e51f801fb
update code comment for helping IDEs (#2095)
* fix unhandled errors

* fix unhandled error in cache package test

* omit variable type

* omit variable type

* rename variable because collide with the imported package name

* handle file error on closing

* fix unhandled in common_linux.go

* fix unhandled errors in helpers_test.go

* fix unhandled errors in listen_test.go

* remove unused parameter in emptyHandler method

* refactor path.go

* unhandled error in hooks test

* fix unhandled errors in app_test.go

* fix unhandled errors in ctx_test.go

*  fix unhandled errors in helpers_test.go

* revert app_test.go

* remove redundant parentheses and update comments

* update code comment for helping ide

* update code comment for helping ide
2022-09-16 11:51:40 +02:00
RW 012a2b16a5
prepare release v2.37.1 2022-09-08 07:32:17 +02:00
RW 1f18ae3549
prepare release v2.37.0 2022-08-30 18:30:41 +02:00
M. Efe Çetin 4d28b1e200
🐛 bug: make tlsHandler public to use it with Listener (#2034)
* 🐛 bug: ClientHelloInfo support for app.Listener

* 🐛 bug: ClientHelloInfo support for app.Listener

* fix

* make tlshandler public

* update

* 🐛 bug: make tlsHandler public to use it with Listener #2034

Co-authored-by: wernerr <rene@gofiber.io>
2022-08-24 09:47:37 +02:00
George Bolo 8540d0afdc
fixes #2016 - make IP() and IPs() more reliable (#2020)
* fixes #2016 - make IP() and IPs() more reliable

* improve the performance of IP validation functionality

* refactor IP validation and make it a configuration option
2022-08-23 08:32:21 +02:00
Thomas 2edcf95f57
update: tls.ClientHelloInfo in Ctx (#2011)
* Update go.mod

* wip

* wip

* wip

* wip

* wip

* Move tlsHandler from Config to App

* Use NewError instead of panic

* Add a test with ServerName

* Add some tests on ClientHelloInfo

* fix missing import

* remove unnecessary ctx field.

Co-authored-by: RW <rene@gofiber.io>
Co-authored-by: Muhammed Efe Çetin <efectn@protonmail.com>
2022-08-19 08:19:22 +02:00
RW f031e08d18
prepare release 2.37.0-rc.1 2022-08-18 16:29:52 +02:00
M. Efe Çetin aa4d2c3f65
📝 docs: make Hooks public (#2015) 2022-08-16 08:13:38 +02:00
M. Efe Çetin 95abdacba0
feature: add XML to context. (#2003)
*  feature: add XML to context.

* Update app.go
2022-08-16 08:05:35 +02:00
M. Efe Çetin 6669ec4486
📝 docs: gofmt & add missing copyright texts (#2013) 2022-08-15 20:25:26 +02:00
Trim21 e5eb8d3c98
fix infinitely `app.Test` (#1997)
* diff

* better code

* err message

* code style

* up

* fix type error

* use time.Timer
2022-08-08 08:18:57 +02:00
RW 7108b444e3
prepare release v2.36.0 2022-08-02 08:11:35 +02:00
RW c59370f47a
prepare release v2.36.0 2022-08-02 08:09:08 +02:00
M. Efe Çetin 4103f9463d
feature: customizable colors (#1977)
*  feature: customizable colors

*  feature: customizable colors

*  feature: customizable colors
2022-08-01 08:24:37 +02:00
RW 2a2337d83e
prepare release v2.35.0 2022-07-06 12:51:08 +02:00
M. Efe Çetin 29be2338e8
♻️ refactor: default error handler & example (#1941)
* ♻️ refactor: default error handler & example

* ♻️ refactor: default error handler & example
2022-07-04 09:15:17 +02:00
RW b1c3b43f7b
Prepare release 2.34.1 2022-06-14 08:01:06 +02:00
João Vitor 4d65e88a2c
Spliting dump request to add Query (#1909)
Spliting []dump into dumps, and editing the dump[1] to = req.URL.String(), so we can tests itens that depends on querys from the request.
2022-06-12 18:33:01 +02:00
RW c541ec1cb8
prepare release 2.34.0 2022-05-23 09:09:52 +02:00
RW b31c1756a0
prepare pre-release 2.34.0-rc.1 2022-05-18 08:44:48 +02:00
RW 17d1d3c2f3
prepare release 2.33.0 2022-05-05 14:59:33 +02:00
Abdulaziz d277bbfce3
reduce duplicate in Get method (#1880)
make code more clear to people!
2022-05-01 09:34:53 +02:00
RW cbb63c0c3c
prepare release 2.32.0 2022-04-15 16:01:43 +02:00
RW e9151e8ab8
Revert " feature: add SendFileWithConfig method to ctx (#1852)" (#1861)
This reverts commit f19ef67f73.
2022-04-15 15:54:18 +02:00
Serhat Şevki Dinçer e7ec08a1e9
📖 fix ListenTLS comment (#1859)
* 📖 fix ListenTLS comment

* 📖 fix ListenMutualTLS comment
2022-04-14 15:55:00 +03:00
M. Efe Çetin f19ef67f73
feature: add SendFileWithConfig method to ctx (#1852)
* add sendfilewithconfig.

* update

* shortify code.
2022-04-14 10:49:48 +02:00
M. Efe Çetin ee65ea5bab
🧹 Use encoding/json (#1851)
* remove goccy/go-json

* fix tests.
2022-04-13 10:45:33 +02:00
RW a8f9d4acfb
🐛 Sub fiber's error handlers not working #1839 (#1848)
fix root level bug
2022-04-05 08:40:22 +02:00
RW 907fdfa9fd
prepare release 2.31.0 2022-03-30 10:01:44 +02:00
RW 528b8b4630
prepare release 2.30.0 2022-03-21 14:57:01 +01:00
M. Efe Çetin bd20e90e6b
feature: add initial support for hooks (#1777)
* Add initial support for hooks.

* release ctx, mutex.

* Add unit tests.

* add comment lines.

* update

* update

* remove unnecessary code.

* fix race condition.

* fix gosec.

* skip error handling for onshutdown and onresponse.

* update

* separate hooks from app.go

* make hooks field private, hook struct public and Hooks() func.

* remove onreq and onres because of they can be done by middlewares.

* OnGroupName method.

* Update hooks.go

Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>

* handle errors for name and groupname

* fix tests.

* Update app.go

* use struct fields instead of map

* add multi-handler.

* add onGroup, make prefix field public on Group struct.

* Update hooks.go

* add newhooks method.

*  feature: add initial support for hooks

* remove ctx from hooks.

Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>
Co-authored-by: wernerr <rene@gofiber.io>
2022-03-10 08:35:15 +01:00