Skip to content

Support for signed Cloudfront web distributions. #112

@silentsilas

Description

@silentsilas

First off, arc_ecto's support for signed S3 urls is fantastic. The library in general makes it easy to version & apply transforms to your assets. Kudos!

However, for the library to support signed cloudfront URL's, I had to do a little regex to remove the versioning[0]:

# In reality, I take the version number and pass it as an additional parameter after signing
String.replace(App.Record.url({song.record, song}), ~r/(\?v=).*$/, "")

Because otherwise running the Cloudfront signing script[1] would now have two ?'s in the URL, thereby breaking the URL and having Cloudfront cache a 403 response for that asset. It would be kewl to add support for passing in your Cloudfront key pair. Would this be an issue for ex_aws?

[0] Thanks to #31 for the idea
[1] This is what I'm using https://github.com/Frameio/cloudfront-signer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions