Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for RemoveSensitiveHeaders (0.21 sec)

  1. internal/crypto/header.go

    	"bytes"
    	"crypto/md5"
    	"encoding/base64"
    	"net/http"
    
    	xhttp "github.com/minio/minio/internal/http"
    )
    
    // RemoveSensitiveHeaders removes confidential encryption
    // information - e.g. the SSE-C key - from the HTTP headers.
    // It has the same semantics as RemoveSensitiveEntries.
    func RemoveSensitiveHeaders(h http.Header) {
    	h.Del(xhttp.AmzServerSideEncryptionCustomerKey)
    	h.Del(xhttp.AmzServerSideEncryptionCopyCustomerKey)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  2. internal/crypto/metadata.go

    		return true
    	}
    	return false
    }
    
    // RemoveSensitiveEntries removes confidential encryption
    // information - e.g. the SSE-C key - from the metadata map.
    // It has the same semantics as RemoveSensitiveHeaders.
    func RemoveSensitiveEntries(metadata map[string]string) { // The functions is tested in TestRemoveSensitiveHeaders for compatibility reasons
    	delete(metadata, xhttp.AmzServerSideEncryptionCustomerKey)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 17:40:33 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  3. cmd/api-headers.go

    	if region := globalSite.Region(); region != "" {
    		w.Header().Set(xhttp.AmzBucketRegion, region)
    	}
    	w.Header().Set(xhttp.AcceptRanges, "bytes")
    
    	// Remove sensitive information
    	crypto.RemoveSensitiveHeaders(w.Header())
    }
    
    // Encodes the response headers into XML format.
    func encodeResponse(response interface{}) []byte {
    	var buf bytes.Buffer
    	buf.WriteString(xml.Header)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 28 04:44:00 UTC 2024
    - 7K bytes
    - Viewed (0)
  4. internal/crypto/header_test.go

    		metadata := make(map[string]string, len(test.Header))
    		for k := range test.Header {
    			metadata[k] = "" // set metadata key - we don't care about the value
    		}
    
    		RemoveSensitiveHeaders(test.Header)
    		if !isEqual(test.ExpectedHeader, test.Header) {
    			t.Errorf("Test %d: filtered headers do not match expected headers - got: %v , want: %v", i, test.Header, test.ExpectedHeader)
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jul 13 14:52:15 UTC 2022
    - 21.4K bytes
    - Viewed (0)
Back to top