Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion middleware/context_timeout.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type ContextTimeoutConfig struct {
// Skipper defines a function to skip middleware.
Skipper Skipper

// ErrorHandler is a function when error aries in middeware execution.
// ErrorHandler is a function when error aries in middleware execution.
ErrorHandler func(err error, c echo.Context) error

// Timeout configures a timeout for the middleware, defaults to 0 for no timeout
Expand Down
4 changes: 2 additions & 2 deletions middleware/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func TestProxyRealIPHeader(t *testing.T) {
tests := []*struct {
hasRealIPheader bool
hasIPExtractor bool
extectedXRealIP string
expectedXRealIP string
}{
{false, false, remoteAddrIP},
{false, true, extractedRealIP},
Expand All @@ -210,7 +210,7 @@ func TestProxyRealIPHeader(t *testing.T) {
e.IPExtractor = nil
}
e.ServeHTTP(rec, req)
assert.Equal(t, tt.extectedXRealIP, req.Header.Get(echo.HeaderXRealIP), "hasRealIPheader: %t / hasIPExtractor: %t", tt.hasRealIPheader, tt.hasIPExtractor)
assert.Equal(t, tt.expectedXRealIP, req.Header.Get(echo.HeaderXRealIP), "hasRealIPheader: %t / hasIPExtractor: %t", tt.hasRealIPheader, tt.hasIPExtractor)
}
}

Expand Down