Browse Source

s3tables: remove legacy principal fallback header

Removed the fallback to X-Amz-Principal in getPrincipalFromRequest as
S3 Tables is a new feature and does not require legacy header support.
pull/8147/head
Chris Lu 3 weeks ago
parent
commit
e4e4dea140
  1. 5
      weed/s3api/s3tables/handler.go

5
weed/s3api/s3tables/handler.go

@ -159,11 +159,6 @@ func (h *S3TablesHandler) getPrincipalFromRequest(r *http.Request) string {
return identityName
}
// Fallback to request header (e.g., for testing or legacy clients)
if principal := r.Header.Get("X-Amz-Principal"); principal != "" {
return principal
}
// Fallback to the authenticated account ID
if accountID := r.Header.Get(s3_constants.AmzAccountId); accountID != "" {
return accountID

Loading…
Cancel
Save