UMNLibraries/umedia

Plain http:// download links cause mixed content warnings

Closed this issue · 0 comments

I'm not able to download the PDF and also received a request from a patron about them. This option should be available for all complex objects on UMedia and shows up as an option along with downloading individual pages by clicking on the 'down arrow' next to the thumbnail. Wheels spin but nothing happens.

Examples:

https://umedia.lib.umn.edu/item/p16022coll359:1050
https://umedia.lib.umn.edu/item/p16022coll359:1915

Chrome, Safari (Firefox still ok) may refuse to download PDFs from the downloads list because we still have plain http:// links as the cdm_endpoint download root to CONTENTdm. This probably only needs to change to https:// in app/lib/umedia/download.rb

    def initialize(item: :MISSING_ID,
                   cdn_endpoint: 'http://cdm16022.contentdm.oclc.org')
      @item = item
      @cdn_endpoint = cdn_endpoint
    end

There appear to be a couple of test matchers in lib/umedia/download_test.rb that expect http:// to update along with this.

Interestingly, when hitting the existing image download URLs from the same dropdowns, they also are http:// but CONTENTdm redirects them to https:// and browsers are ok. It's just the PDF source which is not sent to https:// on the remote site.