Skip to content

Commit 08d0a9a

Browse files
committed
Refactor getContentTypeHeader function to handle packages endpoint and improve logging
1 parent 33579fe commit 08d0a9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jamf/jamfprointegration/headers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
func (j *Integration) getContentTypeHeader(endpoint string) string {
1717
j.Logger.Debug("Determining Content-Type for endpoint", zap.String("endpoint", endpoint))
1818

19-
if strings.HasPrefix(endpoint, "/api/v1/packages/") && strings.Contains(endpoint, "/upload") {
19+
if strings.Contains(endpoint, "/api/v1/packages/") && strings.Contains(endpoint, "/upload") {
2020
j.Logger.Debug("Content-Type for packages upload endpoint set to application/octet-stream", zap.String("endpoint", endpoint))
2121
return "application/octet-stream"
2222
}

0 commit comments

Comments
 (0)