MCPcopy
hub / github.com/labstack/echo / BenchmarkRealIPForHeaderXForwardFor

Function BenchmarkRealIPForHeaderXForwardFor

context_test.go:81–88  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

79}
80
81func BenchmarkRealIPForHeaderXForwardFor(b *testing.B) {
82 c := Context{request: &http.Request{
83 Header: http.Header{HeaderXForwardedFor: []string{"127.0.0.1, 127.0.1.1, "}},
84 }}
85 for i := 0; i < b.N; i++ {
86 c.RealIP()
87 }
88}
89
90func (t *Template) Render(c *Context, w io.Writer, name string, data any) error {
91 return t.templates.ExecuteTemplate(w, name, data)

Callers

nothing calls this directly

Calls 1

RealIPMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…