Merge pull request #1489 from maxlaverse/fix_x_forwarded_for
Compute a real `X-Forwarded-For` header
This commit is contained in:
commit
52ee9d3199
3 changed files with 26 additions and 4 deletions
|
|
@ -386,6 +386,10 @@ type Configuration struct {
|
|||
// Default is X-Forwarded-For
|
||||
ForwardedForHeader string `json:"forwarded-for-header,omitempty"`
|
||||
|
||||
// Append the remote address to the X-Forwarded-For header instead of replacing it
|
||||
// Default: false
|
||||
ComputeFullForwardedFor bool `json:"compute-full-forwarded-for,omitempty"`
|
||||
|
||||
// EnableOpentracing enables the nginx Opentracing extension
|
||||
// https://github.com/rnburn/nginx-opentracing
|
||||
// By default this is disabled
|
||||
|
|
@ -428,6 +432,7 @@ func NewDefault() Configuration {
|
|||
EnableUnderscoresInHeaders: false,
|
||||
ErrorLogLevel: errorLevel,
|
||||
ForwardedForHeader: "X-Forwarded-For",
|
||||
ComputeFullForwardedFor: false,
|
||||
HTTP2MaxFieldSize: "4k",
|
||||
HTTP2MaxHeaderSize: "16k",
|
||||
HSTS: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue