1446 Commits

Author SHA1 Message Date
thinkerou
3483d2c07d remove nil statement 2021-03-27 20:37:01 +08:00
thinkerou
2d7fc06969 add unit test 2021-03-27 13:59:31 +08:00
thinkerou
feaee20a81 add unit test 2021-03-27 12:46:46 +08:00
thinkerou
56fbadcde6
Merge branch 'master' into fix-client-ip-cve 2021-03-27 11:33:54 +08:00
thinkerou
08766787f9 fix error 2021-03-27 11:32:49 +08:00
thinkerou
ed6f85c478
build: convert to go:build directives (#2664) 2021-03-27 09:09:44 +08:00
Javier Provecho Fernandez
7e649c347f feat(engine): add ipv6 support to TrustedProxies 2021-02-10 01:20:44 +00:00
Javier Provecho Fernandez
a598663fde docs(engine): explain new gin.Engine properties 2021-02-09 20:31:20 +00:00
Manu MA
ba157c990a
Merge branch 'master' into fix-client-ip-cve 2021-02-09 16:04:32 +01:00
Javier Provecho Fernandez
15f576c362
docs(readme): remove old reference to hostnames
... as trusted proxies
2021-02-09 00:11:27 +01:00
Andy Pan
1bdf86b722
Remove the tedious named return value (#2620)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-02-08 23:24:22 +08:00
Manu Mtz.-Almeida
fc99953b7f fix 🐨 2021-02-08 14:26:12 +01:00
Manu Mtz.-Almeida
2d426b64c3 add explanation 🦀 2021-02-08 14:24:48 +01:00
Manu Mtz.-Almeida
ffe7ac09d0 🐈 2021-02-08 14:22:58 +01:00
Manu Mtz.-Almeida
6f562eafa8 add docs 2021-02-08 14:19:09 +01:00
Manu Mtz.-Almeida
55ad88a12b refactor move logic to remoteIP() 2021-02-08 14:08:35 +01:00
Javier Provecho Fernandez
e14a43cc4c fix(engine): wrong syntax/behaviour at prepareCIDR 2021-02-08 00:17:21 +00:00
Javier Provecho Fernandez
39b372f163 chore(engine): remove unused lookupHost 2021-02-08 00:06:59 +00:00
Manu Mtz.-Almeida
c9ea8ece4a refactor(): fix client Ip vulnerability 2021-02-08 00:43:37 +01:00
Manu Mtz.-Almeida
31a2afa57f Merge branch 'sorenh/issue2473' of https://github.com/sorenh/gin into sorenh-sorenh/issue2473 2021-02-07 23:29:57 +01:00
Alexander Melentyev
e899771392
chore: Deleted spaces (#2622) 2021-01-27 09:58:21 +08:00
Bo-Yi Wu
d0bf406364
Merge branch 'master' into sorenh/issue2473 2021-01-23 22:53:19 +08:00
Snawoot
b01605bb5b
basic auth: fix timing oracle (#2609)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-01-13 09:40:37 +08:00
Josep Jesus Bigorra Algaba
46ddd4259c
Fixes to the graceful shutdown example (#2552)
* Change error comparison to use errors.Is() and add a line of whitespace before the if statement on graceful shutdown

* Change from log.Fatalf to log.Printf to ensure the graceful shutdown actually works

Co-authored-by: J. J. Bigorra <josep@prowarehouse.nl>
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-01-13 09:06:12 +08:00
Qt
f4bc259de3
fix error gin support min Go version (#2584)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-01-12 08:32:04 +08:00
Rubi
e753c502dc
gin mode unknown: show available mode (#2567)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-01-12 00:03:31 +08:00
Jeff
4d2dad5961
test: fixed the TestUnixSocket test on windows (#2595)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-01-11 09:07:45 +08:00
thinkerou
b7a35bf5b9
Merge branch 'master' into sorenh/issue2473 2021-01-11 08:57:03 +08:00
thinkerou
a28cc088b5
Revert "Adding ppc64le architecture support on travis-ci (#2538)" (#2602) 2021-01-10 23:51:02 +08:00
Bo-Yi Wu
b343e7e5f7
Merge branch 'master' into sorenh/issue2473 2021-01-04 16:27:02 +08:00
kishor kunal raj
fca3f95d7c
Adding ppc64le architecture support on travis-ci (#2538)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-01-03 22:30:22 +08:00
wuhuizuo
4bfae4c8c8
Support binding for slice/array obj [Rewrite] (#2302)
Co-authored-by: thinkerou <thinkerou@gmail.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-01-03 21:43:34 +08:00
thinkerou
a573ec6a37
chore: update tree (#2371)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-01-03 21:34:11 +08:00
thinkerou
3b5e861bb1
fix compile error from #2572 (#2600) 2021-01-03 21:14:56 +08:00
An Xiao (Luffy)
7742ff50e0
Fix typos in context.go (#2551) 2020-11-11 09:41:35 +08:00
Alessandro (Ale) Segala
65ed60ed13
Allow bind with a map[string]string (#2484)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-10-31 07:20:47 +08:00
thinkerou
16cd8cdd4e
ci: romove go1.11 for gin1.7 (#2540) 2020-10-25 17:08:30 +08:00
Peperoncino
7e444c6f59
upgrade go-validator to v10.4.1 (#2536) 2020-10-21 09:36:01 +08:00
Georges Varouchas
f969bfaf50
implement ".Unwrap() error" on Error type (#2525) (#2526)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-10-17 21:22:37 +08:00
xyb
c83a1cca0a
reduce allocs and improve the render WriteString (#2508)
Co-authored-by: yonbiaoxiao <yonbiaoxiao@tencent.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-10-16 18:32:33 +08:00
Zasda Yusuf Mikail
d541085b59
Add some missing dots on README (#2519)
Signed-off-by: Zasda Yusuf Mikail <zasdaym@gmail.com>

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-10-16 09:32:10 +08:00
Zach Newburgh
a7a6986d73
fix: print headers without Authorization header on broken pipe (#2528)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-10-15 22:41:35 +08:00
xyb
1297966100
use IndexByte replace Split to improve performance (#2500)
Co-authored-by: yonbiaoxiao <yonbiaoxiao@tencent.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-10-15 13:55:57 +08:00
eudore
540b1eff70
update content-disposition header to MIME-style (#2512) 2020-09-25 09:45:17 +08:00
John Bampton
3100b7cb05
Fix spelling (#2498) 2020-09-14 10:40:20 +08:00
yugu
1f232c7f47
docs:close the body of the response (#2494) 2020-09-09 20:00:44 +08:00
Dennis Cho
b860d8672d
Fix typo (#2489) 2020-09-02 23:15:25 +08:00
kaiiak
0304ee96ed
Add GetUint and GetUint64 method on gin.context (#2487) 2020-09-01 09:33:54 +08:00
Søren L. Hansen
de0f9eb338 X-Forwarded-For handling is unsafe
Breaks API, but immensely improves security

Fixes #2473
2020-08-22 16:06:15 +02:00
AllinGo
b94d23d1b4
support go 1.15 (#2463) 2020-08-12 09:28:51 +08:00