-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provider/aws: Add CORS settings to S3 bucket #3387
Conversation
👍 |
5 similar comments
👍 |
👍 |
👍 |
👍 |
👍 |
rule["max_age_seconds"] = ruleObject.MaxAgeSeconds | ||
rules = append(rules, rule) | ||
} | ||
d.Set("cors_rule", rules) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we check for errors here? We've found that setting non-primitives, there can be an error and it's best we inspect/log that
if err := d.Set("cors_rule", rules); err != nil {
//log
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
Hey @kjmkznr – so sorry for the delay! I do have a question regarding removing the CORs rules if we remove the website, but other than that this looks great! Let me know what you think |
@catsby I think, do not need remove CORS rules when website removed. |
Thanks! |
provider/aws: Add CORS settings to S3 bucket
Thanks!! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This commit is allows to CORS(Cross-Origin Resource Sharing) rule configuration to S3 bucket resource.