diff options
Diffstat (limited to 'weed/s3api/s3api_auth.go')
| -rw-r--r-- | weed/s3api/s3api_auth.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/weed/s3api/s3api_auth.go b/weed/s3api/s3api_auth.go index bf5cf5fab..8424e7d2c 100644 --- a/weed/s3api/s3api_auth.go +++ b/weed/s3api/s3api_auth.go @@ -53,6 +53,11 @@ func isRequestSignStreamingV4(r *http.Request) bool { r.Method == http.MethodPut } +func isRequestUnsignedStreaming(r *http.Request) bool { + return r.Header.Get("x-amz-content-sha256") == streamingUnsignedPayload && + r.Method == http.MethodPut +} + // Authorization type. type authType int @@ -64,6 +69,7 @@ const ( authTypePresignedV2 authTypePostPolicy authTypeStreamingSigned + authTypeStreamingUnsigned authTypeSigned authTypeSignedV2 authTypeJWT @@ -77,6 +83,8 @@ func getRequestAuthType(r *http.Request) authType { return authTypePresignedV2 } else if isRequestSignStreamingV4(r) { return authTypeStreamingSigned + } else if isRequestUnsignedStreaming(r) { + return authTypeStreamingUnsigned } else if isRequestSignatureV4(r) { return authTypeSigned } else if isRequestPresignedSignatureV4(r) { |
