Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add x-forwarded-for field
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: sdfsdfdsf
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.com/health-checks: "true"
nginx.com/health-checks-mandatory: "true"
nginx.com/health-checks-mandatory-queue: "100"
nginx.ingress.kubernetes.io/proxy-body-size: 50m
nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
nginx.ingress.kubernetes.io/use-forwarded-headers: "true"
data:
log-format-upstream: >
'{{ if $cfg.useProxyProtocol }}$proxy_protocol_addr{{ else }}$remote_addr{{ end }} - '
'[$the_real_ip] - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" "$http_user_agent" '
'$request_length $request_time [$proxy_upstream_name] $upstream_addr '
'$upstream_response_length $upstream_response_time $upstream_status $req_id '
'$http_x_forwarded_for'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment