record access_log

This commit is contained in:
DullJZ
2025-10-04 15:18:45 +08:00
parent d1d970705c
commit 34a905defd
3 changed files with 208 additions and 0 deletions

View File

@@ -36,6 +36,9 @@ func (h *S3Handler) sendS3Error(w http.ResponseWriter, code string, message stri
RequestID: fmt.Sprintf("%d", time.Now().UnixNano()),
}
w.Header().Set("X-Amz-Error-Code", code)
w.Header().Set("X-Amz-Error-Message", message)
statusCode := http.StatusBadRequest
switch code {
case "NoSuchBucket", "NoSuchKey":