Fix COS certificate upload headers
This commit is contained in:
+2
-3
@@ -371,9 +371,8 @@ func UploadCertificatePNGToCOS(ctx context.Context, pngBytes []byte, defaultObje
|
|||||||
|
|
||||||
_, err = client.Object.Put(ctx, objectKey, bytes.NewReader(pngBytes), &cos.ObjectPutOptions{
|
_, err = client.Object.Put(ctx, objectKey, bytes.NewReader(pngBytes), &cos.ObjectPutOptions{
|
||||||
ObjectPutHeaderOptions: &cos.ObjectPutHeaderOptions{
|
ObjectPutHeaderOptions: &cos.ObjectPutHeaderOptions{
|
||||||
ContentType: "image/png",
|
ContentType: "image/png",
|
||||||
ContentLength: len(pngBytes),
|
CacheControl: "public, max-age=31536000, immutable",
|
||||||
CacheControl: "public, max-age=31536000, immutable",
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user