Skip to content

Commit

Permalink
lint: missing comment
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Nov 26, 2023
1 parent 4a59152 commit 53c87cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/proxy/only_from.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func NewOnlyFrom(lookups ...OFLookup) *OnlyFrom {
return &OnlyFrom{lookups: lookups}
}

// Handler implements middleware interface.
func (o *OnlyFrom) Handler(next http.Handler) http.Handler {
fn := func(w http.ResponseWriter, r *http.Request) {
var allowedIPs []string
Expand Down
2 changes: 1 addition & 1 deletion app/proxy/only_from_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func TestOnlyFrom_Handler(t *testing.T) {
onlyFrom := NewOnlyFrom(tt.lookups...)
handler := onlyFrom.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}))

req := httptest.NewRequest("GET", "http://example.com/foo", nil)
req := httptest.NewRequest("GET", "http://example.com/foo", http.NoBody)
req.RemoteAddr = tt.remoteAddr
req.Header.Set("X-Real-IP", tt.realIP)
req.Header.Set("X-Forwarded-For", tt.forwardedFor)
Expand Down

0 comments on commit 53c87cb

Please sign in to comment.