mirror of
https://github.com/pgsty/minio.git
synced 2026-07-24 06:26:17 +03:00
signature: Use a layered approach for signature verification.
Signature calculation has now moved out from being a package to top-level as a layered mechanism. In case of payload calculation with body, go-routines are initiated to simultaneously write and calculate shasum. Errors are sent over the writer so that the lower layer removes the temporary files properly.
This commit is contained in:
+5
-5
@@ -28,11 +28,6 @@ import (
|
||||
"github.com/rs/cors"
|
||||
)
|
||||
|
||||
const (
|
||||
iso8601Format = "20060102T150405Z"
|
||||
privateBucket = "/minio"
|
||||
)
|
||||
|
||||
// HandlerFunc - useful to chain different middleware http.Handler
|
||||
type HandlerFunc func(http.Handler) http.Handler
|
||||
|
||||
@@ -51,6 +46,11 @@ type redirectHandler struct {
|
||||
locationPrefix string
|
||||
}
|
||||
|
||||
// Private bucket.
|
||||
const (
|
||||
privateBucket = "/minio"
|
||||
)
|
||||
|
||||
func setBrowserRedirectHandler(h http.Handler) http.Handler {
|
||||
return redirectHandler{handler: h, locationPrefix: privateBucket}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user