Skip to content

Commit caaa54f

Browse files
fix
1 parent 4f09de9 commit caaa54f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

middlewares/auth.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ func Authenticate(c *fiber.Ctx) error {
120120
}
121121
// for backward compatability
122122
if strings.HasSuffix(path, "/produce/single") || strings.HasSuffix(path, "/produce/batch") {
123-
emptyAuthSchema := models.AuthSchema{}
124-
if user == emptyAuthSchema {
123+
if user.Username == "" {
125124
opts := []memphis.Option{memphis.Reconnect(true), memphis.MaxReconnect(10), memphis.ReconnectInterval(3 * time.Second)}
126125
if configuration.USER_PASS_BASED_AUTH {
127126
opts = append(opts, memphis.Password(configuration.ROOT_PASSWORD))

0 commit comments

Comments
 (0)