3195 Commits

Author SHA1 Message Date
Geet Manghnani
a746e5bfb8
Restore Original URL of the context after changing it (#1788)
* Restore original URL after the proxy

* Use the Immutable string to restore

* Changing deprecated ImmutableString to CopyString

Co-authored-by: Geet Manghnani <gmanghna@in.ibm.com>
2022-02-20 21:59:47 +01:00
Vadim Gerasimenko
c5f11cc800
Fix comment relating to deprecated field (#1790) 2022-02-20 19:01:16 +03:00
RW
1bbcb4b8f3
Fix for "Why net.Addr is fiber.testAddr, not *net.TCPAddr?🤗 #1574" (#1784) 2022-02-19 02:08:06 +01:00
Rendi Putra Pradana
cf47f06ad1
📝 docs: translate some words to bahasa(ID) (#1780)
* docs: translate some words to bahasa

Translate:
download -> unduh
WebSocket support -> Mendukung WebSocket
Route Naming -> Penamaan Route
default -> bawaan

* 📝 docs: translate some words to bahasa(ID)
2022-02-15 15:48:30 +03:00
Fufu
7b1a7a9513
fix: utils.TrimBytes should trim all content (#1779)
* perf: if all string content should be trimmed, end the loop early

* test: complete test cases for all Trim functions

* fix: utils.TrimBytes should trim all content
2022-02-15 07:57:51 +01:00
M. Efe Çetin
e1833df93c
docs: add SSE example (#1776) 2022-02-14 16:27:57 +01:00
RW
daab00c36e
prepare release 2.27.0 v2.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
Trim21
391ae594d8
fix: utils.Trim should trim all string content (#1775)
* fix: `utils.Trim` should trim all string content

* add empty string input

* better fix
2022-02-14 08:01:15 +01:00
M. Efe Çetin
937713e41e
feature: bind support for render (#1754)
* Bind support for Render.

* update

* fix tests

* split Pass-locals-to-views & Bind from Render

* update comments.

* add benchs.

* Update ctx.go

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

* Update ctx.go

* optimize

* switch dictpool.

*  feature: bind support for render
- improve performance

*  feature: bind support for render
- improve performance

Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>
Co-authored-by: wernerr <rene.werner@verivox.com>
Co-authored-by: wernerr <rene@gofiber.io>
2022-02-12 22:52:24 +01:00
bigflood
e3d258655f
Fix: incorrect scheme on proxy.Do (#1762) (#1765) 2022-02-12 19:43:04 +01:00
M. Efe Çetin
aa56364445
bump goccy/go-json to 0.9.4 (#1771) 2022-02-12 19:36:48 +01:00
liaohongxing
1fd6eabba9
fix cache docs error (#1769) 2022-02-12 13:00:00 +01:00
apoq
b9efc76722
Fix cache mutex lock (#1764) 2022-02-11 09:48:52 +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
8bd1509311
Change default gc interval. (#1756) 2022-02-07 13:42:40 +01:00
Abhishek Mehandiratta
68fcd8c88f
Feature: Session Only Cookies (#1752)
* feat(ctx): add SessionOnly property on Cookie struct

* feat(middleware/config): add CookieSessionOnly property on middleware Config struct

* feat(csrf): link config CookieSessionOnly with fiber.Cookie in create middleware function

* fix(ctx_test): add tests for SessionOnly cookie in test_ctx_cookie

* fix(readme): update readme in csrf middleware for CookieSessionOnly property

* remove deprecated property from CookieSessionOnly explaination comments
2022-02-07 13:35:00 +01:00
M. Efe Çetin
ad1a925d38
add missing json errors. (#1755) 2022-02-06 21:28:02 +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
Norbert Hauriel
569511eb78
📝 fix file names (#1747) (#1748) 2022-02-03 12:58:59 -05:00
Matthias Neugebauer
8853190031
🔥 Feature: Add ability to restart route handling (#1739)
* 🔥 Feature: Add ability to restart route handling

* Change test names

Co-authored-by: RW <rene@gofiber.io>
2022-02-03 15:09:46 +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
RW
4d3cc6cd89
Bump github.com/valyala/fasthttp from 1.32.0 to 1.33.0 (#1744) 2022-02-03 14:14:32 +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 v2.26.0 2022-02-03 09:43:41 +01:00
Norbert Hauriel
d85ae2bce3
Doc(limiter): clarify variable name 'expire' (#1742)
This clarifies the intent of variable 'expire' by renaming to
the more understandable 'resetInSec'. All mentions are renamed as well.
2022-02-03 09:26:25 +01:00
Ege Can ÖZER
719992cb75
Add 3rd party middleware eozer/fiber_ldapauth (#1743)
* Add 3rd party middleware eozer/fiber_ldapauth

* Add 3rd party middleware eozer/fiber_ldapauth to other READMEs as well
2022-02-02 20:04:24 +03:00
cenkkoroglu
f3dcb2220e
📝 fix typo (#1741) 2022-02-01 20:42:23 +01:00
M. Efe Çetin
5766feef29
feature: add Next to Pprof and Expvar middlewares. (#1737)
* Add Next to Pprof and Expvar middlewares.

* Update READMEs.
2022-01-29 22:24:32 +01:00
M. Efe Çetin
d3c2122086
Fix route naming when to use group in group. (#1736) 2022-01-29 15:26:01 +01:00
vecpeng
6036f402db
feat: add retryIf function to client agent (#1726) 2022-01-27 12:41:55 +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
a51ec9bc69
🔥 Feature: Add ReqHeaderParser. (#1721)
* Add ReqHeaderParser.

* Cleanup and tidy up parser codes.

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

* Add benchmark for ReqHeaderParser.

* Revert collectVisitAllData

Co-authored-by: RW <rene@gofiber.io>
2022-01-24 20:41:37 +01:00
M. Efe Çetin
559f59f198
Add Route() method like Chi router. (#1713) 2022-01-24 16:37:28 +01:00
Jesse Quinn
d411ec10d6
added HEAD method to caching (#1730)
* added HEAD method to caching

* changed key due to head and get sharing same key

* Update cache.go

- add a improvement task for later

* Update cache.go

correct comment

Co-authored-by: Jesse Quinn <jesse.quinn@zpesystems.com>
Co-authored-by: RW <rene@gofiber.io>
2022-01-24 16:36:46 +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
dependabot[bot]
d59f1af9c8
Bump github.com/valyala/fasthttp from 1.31.0 to 1.32.0 (#1700)
Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.31.0 to 1.32.0.
- [Release notes](https://github.com/valyala/fasthttp/releases)
- [Commits](https://github.com/valyala/fasthttp/compare/v1.31.0...v1.32.0)

---
updated-dependencies:
- dependency-name: github.com/valyala/fasthttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
v2.25.0
2022-01-21 09:24:11 +01:00
RW
8bcce5bba6
prepare release 2.25.0 2022-01-21 09:11:38 +01:00
vecpeng
24b645c779
📝docs: translate English to zh-TW (#1725) 2022-01-21 08:59:42 +01:00
Rendi Putra Pradana
2e1d425d4e
docs: translate some words to bahasa (#1717)
Translate:
download -> unduh
WebSocket support -> Mendukung WebSocket
Route Naming -> Penamaan Route
default -> bawaan
2022-01-18 09:54:19 +01:00
M. Efe Çetin
3663c70f6c
📦 Update goccy/go-json to 0.9.3. (#1719)
* Update goccy/go-json to 0.9.3.

* Remove test
2022-01-18 09:48:11 +01:00
Nick Smith
1b00264385
Fix typos in middleware (#1714)
Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-14 22:31:44 -05:00
M. Efe Çetin
6f34de511e
Update goccy/go-json to 0.9.1. (#1709)
* Update goccy/go-json to 0.9.1.

* fix lint error
2022-01-11 15:23:59 +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
amir
4f1a712498
🩹 Fix: Add csrf_ to default encrypt cookie exception (#1631) (#1698) 2022-01-09 22:21:49 +01:00
Roj
48acc21117
Add Central Kurdish README (#1694) 2022-01-08 14:30:26 +01:00
fncolon
9eab0c5cac
📝docs: fix ID translation typo (#1691)
Fix review in #1690
2022-01-07 11:32:03 +01:00
Ahmet Hakan Beşel
2c9410cb9c
Update Turkish translation (#1689) 2022-01-07 08:14:35 +01:00
fncolon
e964adae91
docs: tweaks README_id.md (#1690)
* translate untranslated words
* fix unconsistent translate of `project`, every project word should be `proyek` instead of `projek` or the original one `project`
* fix wrong translation of Authentication, it should be `Autentikasi` instead of `Authentikasi`
2022-01-07 07:44:07 +01:00