mirror of
https://github.com/restic/rest-server.git
synced 2025-12-06 17:15:45 -08:00
Minor cleanup and fixes
- Do not allow '.' as path component, because it undermines depth checks, and add tests - Fix GiB reporting - Fix metrics label - Helper function for http errors
This commit is contained in:
committed by
Alexander Neumann
parent
1f593fafaf
commit
d4cd47e503
@@ -63,7 +63,7 @@ func makeBlobMetricFunc(username string, folderPath []string) repo.BlobMetricFun
|
||||
var f repo.BlobMetricFunc = func(objectType string, operation repo.BlobOperation, nBytes uint64) {
|
||||
labels := prometheus.Labels{
|
||||
"user": username,
|
||||
"repo": strings.Join(folderPath, ""),
|
||||
"repo": strings.Join(folderPath, "/"),
|
||||
"type": objectType,
|
||||
}
|
||||
switch operation {
|
||||
|
||||
Reference in New Issue
Block a user