netstorage: ignore false positive from the staticcheck linter regarding header name not being canonical

This commit is contained in:
albertony 2022-08-21 16:42:17 +02:00
parent 6c9d377bbb
commit 78deab05f9

View File

@ -819,6 +819,8 @@ func (f *Fs) getAuth(req *http.Request) error {
// Set Authorization header // Set Authorization header
dataHeader := generateDataHeader(f) dataHeader := generateDataHeader(f)
path := req.URL.RequestURI() path := req.URL.RequestURI()
//lint:ignore SA1008 false positive when running staticcheck, the header name is according to docs even if not canonical
//nolint:staticcheck // Don't include staticcheck when running golangci-lint to avoid SA1008
actionHeader := req.Header["X-Akamai-ACS-Action"][0] actionHeader := req.Header["X-Akamai-ACS-Action"][0]
fs.Debugf(nil, "NetStorage API %s call %s for path %q", req.Method, actionHeader, path) fs.Debugf(nil, "NetStorage API %s call %s for path %q", req.Method, actionHeader, path)
req.Header.Set("X-Akamai-ACS-Auth-Data", dataHeader) req.Header.Set("X-Akamai-ACS-Auth-Data", dataHeader)