Skip to content

Conversation

@joeytheman
Copy link

No description provided.

@leonelgalan leonelgalan self-assigned this Mar 3, 2020
Copy link
Owner

@leonelgalan leonelgalan left a comment

Choose a reason for hiding this comment

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

Sorry for the late review, I'm hoping the new Github Inbox, make sit less likely that I would dismiss important notifications.

Thanks for your contribution!

end

def self.build_resources(resource, conditions)
[ resource ].flatten.map do |r|
Copy link
Owner

Choose a reason for hiding this comment

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

We could change [resource].flatten to Array(resource).

Comment on lines +90 to +98
With multiple resources

```ruby
url = Aws::CF::Signer.sign_url 'http://d604721fxaaqy9.cloudfront.net/training/orientation.avi',
expires: 'Sat, 14 Nov 2009 22:20:00 GMT',
resource: [ 'http://d604721fxaaqy9.cloudfront.net/training/*', 'http://d604721fxaaqy9.cloudfront.net/lessons/*' ],
ip_range: '145.168.143.0/24'
```

Copy link
Owner

Choose a reason for hiding this comment

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

What's the use case here?

Why not http://d604721fxaaqy9.cloudfront.net/*?

In "Creating a Policy Statement for a Signed URL That Uses a Custom Policy", it says:

Note the following:

  • You can include only one statement.

end
end

def self.build_resources(resource, conditions)
Copy link
Owner

Choose a reason for hiding this comment

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

Don't you think build_statements would be a more appropriate name? It seem you are building an array of statements, all with Resource and Condition.

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