Skip to content

Instantly share code, notes, and snippets.

@simonjohansson
Created August 19, 2015 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonjohansson/3324b08fc42e5ac7105a to your computer and use it in GitHub Desktop.
Save simonjohansson/3324b08fc42e5ac7105a to your computer and use it in GitHub Desktop.
Logs from gorouter
In proxy.ServeHTTP
Request: &{GET / HTTP/1.1 1 1 map[Accept:[*/*] Forwarded:[for=172.21.27.221; proto=http] X-Forwarded-Proto:[http] X-Forwarded-For:[172.21.27.221] True_client_ip:[172.21.27.221] X-Cf-Requestid:[874ed33a-c361-4946-74c3-c18b693ade7e] User-Agent:[curl/7.43.0]] 0xbb2730 0 [] false cf-env.test.cf.springer-sbm.com map[] map[] <nil> map[] 10.230.31.8:43597 / <nil>}
X-Forwarded-For before newReverseProxy.ServeHTTP: 172.21.27.221
In net/http/httputil/reverseproxy.go: ServeHTTP
X-Forwarded-For in req before 'If we aren't the first proxy retain prior': 172.21.27.221
X-Forwarded-For in outreq: 172.21.27.221, 10.230.31.8
X-Forwarded-For in req after 'If we aren't the first proxy retain prior': 172.21.27.221, 10.230.31.8
Done in net/http/httputil/reverseproxy.go: ServeHTTP
X-Forwarded-For after newReverseProxy.ServeHTTP: 172.21.27.221, 10.230.31.8
$ cf logs cf-env
2015-08-19T15:11:36.22+0200 [RTR/0] OUT cf-env.test.cf.springer-sbm.com - [19/08/2015:13:11:36 +0000] "GET / HTTP/1.1" 200 0 4155 "-" "curl/7.43.0" 10.230.31.8:43597 x_forwarded_for:"172.21.27.221, 10.230.31.8" vcap_request_id:c2ce64d5-5951-46fb-7b0a-9ea233c34823 response_time:0.011068200 app_id:9011c83a-9407-4e0a-ae91-0c66ff3d6e92
Logs from gorouter
In proxy.ServeHTTP
Request: &{GET / HTTP/1.1 1 1 map[True_client_ip:[172.21.27.221] X-Cf-Requestid:[d7629a05-cbae-4f13-63d2-43acf5bfe8c9] User-Agent:[Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0] Accept-Language:[en-US,en;q=0.5] Accept-Encoding:[gzip, deflate] Forwarded:[for=172.21.27.221; proto=http] X-Forwarded-Proto:[http] X-Forwarded-For:[172.21.27.221] Accept:[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8] Cookie:[wt3_eid=%3B846182373400841%7C2141346926300579527%3B532695141032829%7C2142289007300951926%3B929408468507536%7C2142323421600457694%3B987963572816400%7C2142323579400274413%3B595753140200997%7C2142364572200667778%3B754741632944378%7C2142539934000605010] Connection:[keep-alive]] 0xbb2730 0 [] false cf-env.test.cf.springer-sbm.com map[] map[] <nil> map[] 10.230.31.8:43601 / <nil>}
X-Forwarded-For before newReverseProxy.ServeHTTP: 172.21.27.221
In net/http/httputil/reverseproxy.go: ServeHTTP
X-Forwarded-For in req before 'If we aren't the first proxy retain prior': 172.21.27.221
X-Forwarded-For in outreq: 172.21.27.221, 10.230.31.8
X-Forwarded-For in req after 'If we aren't the first proxy retain prior': 172.21.27.221
Done in net/http/httputil/reverseproxy.go: ServeHTTP
X-Forwarded-For after newReverseProxy.ServeHTTP: 172.21.27.221
$ cf logs cf-env
2015-08-19T15:12:16.28+0200 [RTR/0] OUT cf-env.test.cf.springer-sbm.com - [19/08/2015:13:12:16 +0000] "GET / HTTP/1.1" 200 0 4700 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0" 10.230.31.8:43601 x_forwarded_for:"172.21.27.221" vcap_request_id:f807d34a-9191-4a29-5831-cb78eece72e1 response_time:0.008955044 app_id:9011c83a-9407-4e0a-ae91-0c66ff3d6e92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment