2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
1
Hi,
Please use this link as a reference https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManageCorsUsing.html
[
{
"AllowedHeaders": [
"Content-Type",
"Authorization"
],
"AllowedMethods": [
"PUT",
"POST",
"GET"
],
"AllowedOrigins": [
"http://www.example.com"
],
"ExposeHeaders": [
"x-custom-header"
],
"MaxAgeSeconds": 3000
}
]
0
try using this template:
{ "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": ["http://example.com"], "AllowedMethods": ["GET", "POST", "PUT"], "AllowedHeaders": ["Content-Type", "Authorization"], "MaxAgeSeconds": 3000, "ExposeHeaders": ["x-custom-header"] } ] } }
If this has answered your question or was helpful, accepting the answer would be greatly appreciated. Thank you!
Contenus pertinents
- demandé il y a un an
- demandé il y a 6 mois
- demandé il y a 2 mois
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a un an
Thanks a lot for taking the time to respond. Still getting this error: The CORS configuration must be written in valid JSON. API response Expected params.CORSConfiguration.CORSRules to be an Array