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

380 Commits

Author SHA1 Message Date
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 f19ef67f73f140a92e7359fdf83acabc6a5db094.
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
RW
166e55eec6
prepare release 2.29.0 2022-03-08 13:55:10 +01:00
Serhat Şevki Dinçer
8b0170c0f4
🔗 Fix goreportcard & pkg.go.dev links in READMEs (#1798)
* 🔗 Fix goreportcard & pkg.go.dev links in READMEs

* 🔗 Fix package comment for pkg.go.dev links

* 🔗 Replace golang.org links with go.dev in READMEs

Co-authored-by: RW <rene@gofiber.io>
2022-03-03 11:54:56 +01:00
RW
d4c3f27023
prepare release 2.28.0 2022-02-28 08:19:40 +01:00
M. Efe Çetin
a7032b7a17
Update TLS Config & Add ListenMutualTLS (#1761)
* deprecations

* Add mTLS support.

* update

* update

* Update app.go
2022-02-24 08:01:42 +01:00
M. Efe Çetin
b0dd0bdb14
Update app.go (#1787) 2022-02-22 08:10:55 +01:00
RW
daab00c36e
prepare release 2.27.0 2022-02-14 15:32:18 +01:00
Eren BALCI
74a20b4589
🩹 fix: backwards incompatible change to fiber.Error (#1768)
* fix: backwards incompatible change to fiber.Error

* revert: work backward compatible
2022-02-14 08:17:04 +01:00
Sujit Baniya
505e4d77a7
[FEATURE REQUEST] - Add RedirectToRoute and RedirectBack (#1750)
* Add Global Layout for view render

* Add test case for Views Layout

* Update ctx_test.go

* Add App Name function to pass custom app name

* Remove json tag for function

* Change func to string

* Add test for AppName

* Add RedirectToRoute and RedirectBack with fallback if referer in header not found

* replace errors.New with fmt.Errorf

* simplified code

* Add tests for different formats

* Add method to get route location and add benchmarks

* Add ToString function

* Fix error

* rearrange case for fmt.Stringer

* Fix bug for error return

* Lock latest route for app.Name(namee string)

* decreasing timeout for client test with timeout

* remove println and adjust condition to > 0

Co-authored-by: RW <rene@gofiber.io>
2022-02-09 09:02:45 +01:00
M. Efe Çetin
c450072f4a
🐛 fix: mounted app views (#1749)
* Fix mounted app views.

* Cleaner structure.

Co-authored-by: RW <rene@gofiber.io>

* remove unnecessary lines.

* Add test case for group-with-mount, remove unnecessary lines.

Co-authored-by: RW <rene@gofiber.io>
2022-02-06 14:58:45 +01:00
Lian
af10fab05b
Add direct download option when serving static files (#1729)
* enable download for app.Static


wording

* Add unit test.

Co-authored-by: Muhammed Efe Çetin <efectn@protonmail.com>
2022-02-03 14:41:45 +01:00
Aliqyan Tapia
39a503cc1d
🚀 SaveFile to default External Storage (#1557)
* fiber change

* reference correct storage in SaveFile

* seperate logic to new function

* Change storage defination style, fix tests on go1.14

* Add unit test.

Co-authored-by: Alex Bakker <abakks@hotmail.com>
Co-authored-by: M. Efe Çetin <efectn@protonmail.com>
2022-02-03 14:09:11 +01:00
RW
6b29698d91
prepare release 2.26.0 2022-02-03 09:43:41 +01:00
cenkkoroglu
f3dcb2220e
📝 fix typo (#1741) 2022-02-01 20:42:23 +01:00
Eren BALCI
7cf1886df5
Fix NewErrors() and Improve NewError() (#1728)
* fix new errors

* fix tests

* removed new errors tests

* changed error message type

* fixed NewError test

* added NewErrors function

* added Test_NewErrors

* added comment line

* refactor: Sprintf changed with Sprint
2022-01-27 12:41:10 +01:00
M. Efe Çetin
559f59f198
Add Route() method like Chi router. (#1713) 2022-01-24 16:37:28 +01:00
kingdevnl
82d1039416
feature: Pass all locals to ctx.Render (#1693)
* feature: Pass all locals to ctx.Render

* add test case for render using locals

* Added option PassLocalsToViews to enable pass locals to render

The option PassLocalsToViews is set to disabled by default

* Added a check to see if the ctx bind already contains the value

* Added a test for ctx render with locals and binds.
2022-01-24 08:29:46 +01:00
RW
8bcce5bba6
prepare release 2.25.0 2022-01-21 09:11:38 +01:00
vecpeng
2e697a6e9b
🐛fix: json tag (#1702) 2022-01-10 14:22:44 +01:00
vecpeng
5fe95c2579
feat: add function NewErrors to create multiple new errors (#1701) 2022-01-10 14:22:34 +01:00
RW
8f2a841db9
prepare release 2.24.0 2021-12-31 18:33:49 +01:00
hi019
eee279bdb3
Fix using IP ranges in config.TrustedProxies (#1607) (#1614)
* Fix using IP ranges in config.TrustedProxies (#1607)

* Add tests

* Remove debugging var

* Remove tests

* Update test

Co-authored-by: RW <rene@gofiber.io>
2021-12-31 18:32:39 +01:00
M. Efe Çetin
e26ed83166
Improve printRoutesMessage (#1681) 2021-12-30 23:03:44 +01:00