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

S3Boto3Storage: add support for Cloudfront settings through OPTIONS #1274

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

PetrDlouhy
Copy link
Contributor

@PetrDlouhy PetrDlouhy commented Aug 14, 2023

Add support for setting "cloudfront_key_id" and "cloudfront_key" through OPTIONS

Addresses issue #1271

@jschneier
Copy link
Owner

I see, the problem is that we're running logic in get_default_settings which is probably a mistake. Also, I believe this would break support of AWS_CLOUDFRONT_KEY_ID etc.

I think we should instead:

  1. Remove the checking logic from within get_default_settings and move it to __init__ just before the signer creation you added
  2. Remove the creation of cloudfront_signer and stop returning it in the dict
  3. Add cloudfront_key_id and cloudfront_key as return values in the dict
  4. Update the creation logic to use self.cloudfront_key and self.cloudfront_signer

What do you think?

@jschneier
Copy link
Owner

Oh I see, it doesn't break the current flow it just overrides it.

@jschneier
Copy link
Owner

Yeah on second look i think this change looks good, thanks.

@jschneier jschneier merged commit 0e6f10f into jschneier:master Sep 2, 2023
15 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.

2 participants