mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 20:52:33 +02:00
add recursive option to cloudflareRealIP
This commit is contained in:
parent
c66694aa32
commit
2e86f8e6d8
1 changed files with 3 additions and 2 deletions
|
@ -16,7 +16,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type cloudflareRealIP struct {
|
type cloudflareRealIP struct {
|
||||||
realIP realIP
|
realIP realIP
|
||||||
|
Recursive bool
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -38,7 +39,7 @@ var CloudflareRealIP = NewMiddleware[cloudflareRealIP]()
|
||||||
func (cri *cloudflareRealIP) setup() {
|
func (cri *cloudflareRealIP) setup() {
|
||||||
cri.realIP.RealIPOpts = RealIPOpts{
|
cri.realIP.RealIPOpts = RealIPOpts{
|
||||||
Header: "CF-Connecting-IP",
|
Header: "CF-Connecting-IP",
|
||||||
Recursive: true,
|
Recursive: cri.Recursive,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue