# NOT RUN {
# The following example enables PUT, POST, and DELETE requests from
# www.example.com, and enables GET requests from any domain.
svc$put_bucket_cors(
Bucket = "",
CORSConfiguration = list(
CORSRules = list(
list(
AllowedHeaders = list(
"*"
),
AllowedMethods = list(
"PUT",
"POST",
"DELETE"
),
AllowedOrigins = list(
"http://www.example.com"
),
ExposeHeaders = list(
"x-amz-server-side-encryption"
),
MaxAgeSeconds = 3000L
),
list(
AllowedHeaders = list(
"Authorization"
),
AllowedMethods = list(
"GET"
),
AllowedOrigins = list(
"*"
),
MaxAgeSeconds = 3000L
)
)
),
ContentMD5 = ""
)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab