Skip to content

Commit dd3da5b

Browse files
hardikdrdefo89
andcommitted
Update server/imageproxyserver.go
Co-authored-by: Dmitri Fedotov <[email protected]>
1 parent 7e97d81 commit dd3da5b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/imageproxyserver.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const (
2222
imageKey = "imageName"
2323
layerDigestKey = "layerDigest"
2424
versionKey = "version"
25+
MediaTypeUKI = "application/vnd.ironcore.image.uki"
2526
)
2627

2728
type TokenResponse struct {
@@ -207,7 +208,7 @@ func modifyProxyResponse(bearerToken string) func(*http.Response) error {
207208
}
208209

209210
// Rewrite media type if it's a UKI
210-
if ct := resp.Header.Get("Content-Type"); ct == "application/vnd.ironcore.image.uki" {
211+
if ct := resp.Header.Get("Content-Type"); ct == MediaTypeUKI {
211212
resp.Header.Set("Content-Type", "application/efi")
212213
}
213214

0 commit comments

Comments
 (0)