Skip to content
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

Add commands for managing Bucket CORS #5019

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

marktheunissen
Copy link
Contributor

@marktheunissen marktheunissen commented Aug 13, 2024

Community Contribution License

All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.

Description

Add the following commands:

  • mc cors set
  • mc cors remove
  • mc cors get

Motivation and Context

These will work with S3 and MinEOS

How to test this PR?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Unit tests added/updated
  • Internal documentation updated
  • Create a documentation update request here

@marktheunissen marktheunissen force-pushed the bucketcors-commands branch 2 times, most recently from df83db8 to 1fae1d1 Compare August 13, 2024 05:14
@marktheunissen marktheunissen requested review from harshavardhana and zveinn and removed request for harshavardhana August 13, 2024 05:28
Copy link
Contributor

@zveinn zveinn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks solid.

}

// corsMessage container for output message.
type corsMessage struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this msg is used by all commands.. maybe it and it's methods should live in the cord-main.go file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zveinn Good point, and I agree, but I put corsMessage in here to be consistent with the other commands that share a message struct, here are three examples:

I am totally happy to move it, just give me the 👍 and ack that it makes it inconsistent with the rest of the commands.

Could also make a follow up PR to move them all. I don't know why it's like this.

@marktheunissen marktheunissen force-pushed the bucketcors-commands branch 3 times, most recently from d03d0bc to 8c10b67 Compare August 20, 2024 01:13
cmd/cors-set.go Outdated Show resolved Hide resolved
Copy link
Contributor

@klauspost klauspost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@harshavardhana harshavardhana merged commit efa1b39 into minio:master Aug 22, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants