do not return if client IP is not allowed in login API response

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2024-12-28 18:56:12 +01:00
parent 2459d96b58
commit 4897ef35ff
2 changed files with 5 additions and 4 deletions

View File

@@ -2115,7 +2115,7 @@ func TestProxyHeaders(t *testing.T) {
rr := httptest.NewRecorder()
testServer.Config.Handler.ServeHTTP(rr, req)
assert.Equal(t, http.StatusUnauthorized, rr.Code)
assert.Contains(t, rr.Body.String(), "login from IP 127.0.0.1 not allowed")
assert.NotContains(t, rr.Body.String(), "login from IP 127.0.0.1 not allowed")
req.RemoteAddr = testIP
rr = httptest.NewRecorder()