36 Commits

Author SHA1 Message Date
M. Efe Çetin
691d2e6ad5
🗑️ deprecate: go 1.14 & go 1.15 support deprecation (#2172)
* 🗑️ deprecate: go 1.14 & go 1.15 support deprecation
https://github.com/valyala/fasthttp/pull/1379

* fix tests
2022-10-26 11:51:50 +02:00
kinggo
d275091a2f
🐛 fix: solve data race in middleware/proxy's test (#2153)
fix: solve data race in middleware/proxy's test
2022-10-17 17:20:41 +02:00
kinggo
8e8ad95079
feat: support to set client in proxy mw (#2117)
optimize: add WithClient
2022-09-28 14:27:58 +02:00
Jinquan Wang
e8a2ba363c
🐛 bug: fix proxy overwrote the wrong scheme (#2004)
* 🐛 bug: fix proxy overwrote the wrong scheme

*  fix: fix io not exist in go1.14
2022-08-09 16:14:41 +02:00
RW
ff1e0109a3
Closes #1931 "🤗 How to get path param before a custom verb?" (#1983)
* Add possibility for parameters before custom verb
FIX for "🤗 How to get path param before a custom verb? #1931"

* try to stabilize the tests
2022-07-27 08:37:03 +02:00
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
bigflood
e3d258655f
Fix: incorrect scheme on proxy.Do (#1762) (#1765) 2022-02-12 19:43:04 +01:00
Gusted
7b7dcf29f7
♻️ Tidy up the codebase (#1613)
* run gofmt

* add t.Helper()

* Simplify assigns

* Simplify make operation

* Remove unused field in struct

* Fix typo

* Run gofumpt ./

* Consistent spacing

* len(...) can never be negative

* Use ReplaceAll

* Simplify operation

* Remove deadcode

* Fix typo

* Tidy up `} else { if ...`

* Fix AssertEqual

* Remove t.Helper() to fix go1.14.15
2021-11-05 08:00:03 +01:00
tuhao1020
93dc33ad89
add tls config for http client in proxy middleware (#1393)
* add tls config for http client in proxy middleware

* update exmaple and make tls.config also affects to proxy.Balancer

* add Test_Proxy_Forward_WithTlsConfig

* add a variable of type *tls.Config

* add a RWMutex for clientTlsConfig

* remove global tls config

* Update README.md

* Update proxy.go

Co-authored-by: RW <rene@gofiber.io>
2021-06-24 08:13:18 +02:00
RW
8e89949381
🚀 Configure proxy.Balancer with custom timeout #1362 (#1364)
* 🚀 new possibility to escape special routing parameters, which gives the possibility to follow the google api design guide https://cloud.google.com/apis/design/custom_methods

* 🚀 new possibility to escape special routing parameters, which gives the possibility to follow the google api design guide https://cloud.google.com/apis/design/custom_methods

* 🚀 Configure proxy.Balancer with custom timeout or client #1362

* 🚀 Configure proxy.Balancer with custom timeout or client #1362
2021-06-04 16:54:03 +02:00
Costa
bad3abb8ed
fix comments in proxy middleware (#1355)
fix a little comment wrong in proxy middleware
2021-06-01 08:34:33 +02:00
Jean-Sébastien Ney
c3aafde9db
[middleware/proxy] add buffer size configuration (#1292)
* add buffer size

* add tests
2021-04-20 12:56:00 +02:00
kiyon
0d8fa6bf63
Merge pull request #1187 from kiyonlin/improve-proxy-test
👷 Improve proxy middleware test case
2021-02-23 16:28:14 +08:00
Kiyon
1a67fdb343 👷 Improve proxy middleware test case
- add t.Parallel()
- use random port
2021-02-23 15:32:27 +08:00
cornerot
0e2e04b9ba
add fasthttp.LBClient to the proxy middleware 2021-02-04 23:04:11 +03:00
Fenny
687717f113 🛠 separate config 2020-11-11 14:03:16 +01:00
Fenny
ea1fed9cbb ⏲ increase delay for workflow 2020-11-06 02:02:02 +01:00
Fenny
f4e40a7224 🩹 remove invalid test 2020-11-06 02:00:06 +01:00
Fenny
619f802fc6
Merge pull request #951 from Fenny/master
✏ fix example
2020-10-22 03:17:52 -07:00
Fenny
d6ee49dce5 🩹 fix workflow 2020-10-22 12:16:04 +02:00
Fenny
4e895a0f61 ✏ fix example 2020-10-22 12:09:40 +02:00
Fenny
7f0f6f656c
Merge pull request #950 from jney/feature/fix-doc
Feature/fix doc
2020-10-22 03:07:58 -07:00
Jean-Sébastien Ney
34e6274ab5 fix update request 2020-10-22 11:28:35 +02:00
Fenny
773968abf0 ✏ update test case 2020-10-21 23:42:03 +02:00
Konstantinos Lypitkas
b5e85346ac Replace localhost with IP 2020-10-15 16:23:13 +03:00
Fenny
e3c2dfae23 🧪 update proxy unit test 2020-10-15 13:03:06 +02:00
Fenny
0db09d9f0b 📦 don't allow empty servers on proxy mw 2020-10-15 12:54:17 +02:00
Konstantinos Lypitkas
483931fdcc Remove extra slashes from comments 2020-10-15 13:15:59 +03:00
hi019
db1eedb5b7
💚 Fix CI: remove localhost from target.Listen 2020-10-13 19:23:05 -04:00
Konstantinos Lypitkas
3d59648b7d Refactor proxy middleware and increase coverage 2020-10-14 00:48:09 +03:00
Fenny
4662dd8219 🩹 fix proxy middleware 2020-09-27 18:24:05 +02:00
kiyon
616ff8f532 👷 remove unnecessary fiber app config 2020-09-17 13:41:06 +08:00
Fenny
1a3bd53e1c 🔨 fix proxy test 2020-09-14 12:34:31 +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