mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 20:20:25 +03:00
move SSE-C TLS enforcement into generic handler (#6639)
This commit moves the check that SSE-C requests must be made over TLS into a generic HTTP handler. Since the HTTP server uses custom TCP connection handling it is not possible to use `http.Request.TLS` to check for TLS connections. So using `globalIsSSL` is the only option to detect whether the request is made over TLS. By extracting this check into a separate handler it's possible to refactor other parts of the SSE handling code further.
This commit is contained in:
committed by
Harshavardhana
parent
88c8c2d6cd
commit
fdf691fdcc
@@ -82,6 +82,8 @@ var globalHandlers = []HandlerFunc{
|
||||
// routes them accordingly. Client receives a HTTP error for
|
||||
// invalid/unsupported signatures.
|
||||
setAuthHandler,
|
||||
// Enforce rules specific for TLS requests
|
||||
setSSETLSHandler,
|
||||
// filters HTTP headers which are treated as metadata and are reserved
|
||||
// for internal use only.
|
||||
filterReservedMetadata,
|
||||
|
||||
Reference in New Issue
Block a user