mirror of
https://github.com/yusing/godoxy.git
synced 2025-07-09 07:54:03 +02:00
fix: cloudflare realIP should defaults to be recursive
This commit is contained in:
parent
c72f66d64b
commit
66853dfc52
1 changed files with 2 additions and 3 deletions
|
@ -18,7 +18,6 @@ import (
|
||||||
|
|
||||||
type cloudflareRealIP struct {
|
type cloudflareRealIP struct {
|
||||||
realIP realIP
|
realIP realIP
|
||||||
Recursive bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -47,7 +46,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: cri.Recursive,
|
Recursive: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue