Categorygithub.com/roadrunner-server/proxy_ip_parser/v3
modulepackage
3.2.0
Repository: https://github.com/roadrunner-server/proxy_ip_parser.git
Documentation: pkg.go.dev

# README

proxy_ip_parser

X-Forwarded-*, Forwarded, True-Client-IP, X-Real-Ip parser http middleware.

Description

When proxy is trusted, the leftmost IP address will be used as a RemoteAddr. Otherwise RemoteAddr won't be changed.

Usage

http:
  address: 127.0.0.1:12811
  max_request_size: 1024
  middleware: [ "proxy_ip_parser" ] <------ Middleware
  uploads:
    forbid: [ ".php", ".exe", ".bat" ]
  trusted_subnets: <----- Trusted addresses in CIDR format
    [
      "10.0.0.0/8",
      "127.0.0.0/8",
      "172.16.0.0/12",
      "192.168.0.0/16",
      "::1/128",
      "fc00::/7",
      "fe80::/10"
    ]
  pool:
    num_workers: 2
    max_jobs: 0
    allocate_timeout: 60s
    destroy_timeout: 60s

# Structs

No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

Cidrs is a slice of IPNet addresses.