Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

s3_protocol default could be more sensible #2038

Closed
hannesfostie opened this issue Nov 6, 2015 · 4 comments
Closed

s3_protocol default could be more sensible #2038

hannesfostie opened this issue Nov 6, 2015 · 4 comments

Comments

@hannesfostie
Copy link

Hi,

I just spent a little while trying to figure out why my Attachment URLs were http instead of https. I started looking in my AWS config at first, where HTTPS is the default, and then finally came across the Paperclip documentation which states the following:

    # * +s3_protocol+: The protocol for the URLs generated to your S3 assets. Can be either
    #   'http', 'https', or an empty string to generate protocol-relative URLs. Defaults to 'http'
    #   when your :s3_permissions are :public_read (the default), and 'https' when your
    #   :s3_permissions are anything else.

I don't quite see why we'd want to default to http based on s3_permissions. If anything, we should look at the AWS settings and use that protocol?

@betesh
Copy link
Contributor

betesh commented Nov 16, 2015

+1 IMO it should default to an empty string.

@tute
Copy link
Contributor

tute commented May 10, 2016

I don't quite see why we'd want to default to http based on s3_permissions. If anything, we should look at the AWS settings and use that protocol?

This sound good to me. Is there a reason why we should default to HTTPS?

@betesh
Copy link
Contributor

betesh commented May 11, 2016

With an empty String as default, if you're on an HTTPS page, you'll get HTTPS, and if you're on an HTTP page, you'll get HTTP. That's probably what the vast majority of users want and expect. public_read (now 'public-read') has nothing to do with what protocol is in use on the page where you are displaying the images, so it's not at all expected.

@tute
Copy link
Contributor

tute commented May 11, 2016

In that case, empty string it is.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants