MCPcopy Create free account
hub / github.com/zalando/skipper / TestUseXForwardedJSON

Function TestUseXForwardedJSON

logging/access_test.go:182–191  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

180}
181
182func TestUseXForwardedJSON(t *testing.T) {
183 entry := testAccessEntry()
184 entry.Request.Header.Set("X-Forwarded-For", "192.168.3.3")
185 testAccessLog(
186 t,
187 entry,
188 `{"audit":"","auth-user":"","duration":42,"flow-id":"","host":"192.168.3.3","level":"info","method":"GET","msg":"","proto":"HTTP/1.1","referer":"","requested-host":"example.com","response-size":2326,"status":418,"timestamp":"10/Oct/2000:13:55:36 -0700","uri":"/apache_pb.gif","user-agent":""}`,
189 Options{AccessLogJSONEnabled: true},
190 )
191}
192
193func TestPortFwd4(t *testing.T) {
194 entry := testAccessEntry()

Callers

nothing calls this directly

Calls 3

testAccessEntryFunction · 0.85
testAccessLogFunction · 0.85
SetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…