Get client IP when using Cloudflare (#2723)

Co-authored-by: thinkerou <thinkerou@gmail.com>
This commit is contained in:
Alessandro (Ale) Segala
2021-05-27 19:03:59 -07:00
committed by GitHub
parent 0cbb30aa94
commit 6703dea51c
3 changed files with 18 additions and 1 deletions
+4
View File
@@ -105,6 +105,10 @@ type Engine struct {
// 'X-AppEngine...' for better integration with that PaaS.
AppEngine bool
// If enabled, it will trust the CF-Connecting-IP header to determine the
// IP of the client.
CloudflareProxy bool
// If enabled, the url.RawPath will be used to find parameters.
UseRawPath bool