How can I set the properties set_real_ip_from/real_ip_header/real_ip_recursive to route or service?

How can I set the properties set_real_ip_from/real_ip_header/real_ip_recursive to route or service?
like this nginx setting, I just want to keep it in scope route, service or upstream

upstream backend-test {
server test;
keepalive 128;
}

location = /test{
set_real_ip_from 10.0.0.0/8;
set_real_ip_from 100.120.0.0/16;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
proxy_pass http://backend-test;
}


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ