console: use an ETag for avatars

The Remote-User header is unlikely to be visible from the browser.
This commit is contained in:
Vincent Bernat
2022-06-01 11:58:00 +02:00
parent 0a2c801297
commit 78f628b6db
2 changed files with 19 additions and 2 deletions

View File

@@ -87,6 +87,16 @@ func TestUserHandler(t *testing.T) {
}(),
ContentType: "image/png",
StatusCode: 200,
}, {
Description: "avatar, simple user, etag",
URL: "/api/v0/console/user/avatar",
Header: func() netHTTP.Header {
headers := make(netHTTP.Header)
headers.Add("Remote-User", "alfred")
headers.Add("If-None-Match", `"b2e72a535032fa89"`)
return headers
}(),
StatusCode: 304,
},
})
})