You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"The CORS configuration must contain at least one rule in the 'rules' array."
1373
-
),
1374
-
}).refine(
1375
-
(data)=>"rules"indata,
1376
-
{
1377
-
message:"The CORS configuration file must contain a 'rules' array as expected by the request body of the CORS API: https://developers.cloudflare.com/api/operations/r2-put-bucket-cors-policy",
1378
-
}
1379
-
);
1367
+
constCORSConfigSchema=z
1368
+
.object({
1369
+
rules: z
1370
+
.array(CORSRuleSchema)
1371
+
.min(
1372
+
1,
1373
+
"The CORS configuration must contain at least one rule in the 'rules' array."
1374
+
),
1375
+
})
1376
+
.refine((data)=>"rules"indata,{
1377
+
message:
1378
+
"The CORS configuration file must contain a 'rules' array as expected by the request body of the CORS API: https://developers.cloudflare.com/api/operations/r2-put-bucket-cors-policy",
0 commit comments