wimleers / fileconveyor

File Conveyor is a daemon written in Python to detect, process and sync files. In particular, it's designed to sync files to CDNs. Amazon S3 and Rackspace Cloud Files, as well as any Origin Pull or (S)FTP Push CDN, are supported. Originally written for my bachelor thesis at Hasselt University in Belgium.
https://wimleers.com/fileconveyor
The Unlicense
341 stars 95 forks source link

Cloudfront URLs being generated with HTTPS by default, with query string, both of which I don't need #133

Closed yusufhm closed 4 years ago

yusufhm commented 11 years ago

I'm using the Drupal CDN module with File Conveyor.

As stated in the title, Cloudfront URLs for my files are being generated with HTTPS by default, with additional queries, both of which I don't need. I have checked that I can access the files without the HTTPS and the queries.

E.g, a link created is https://lemauricien-files.hmhosts.com/sites/default/files/imagecache/thumbnail/article/2012/12/16/justice_symbole.jpg?Signature=0FKXA%2BWbPlj9rXQ2l%2F6h43uYSOE%3D&Expires=1355667336&AWSAccessKeyId=AKIAI5UCTNX3O6WDZBKQ. It requires you to accept a certificate, which is unacceptable for the site on which I want to use the CDN as the images never get displayed, since you don't see the page for accepting the certificate.

When I use the URL without the two, i.e, http://lemauricien-files.hmhosts.com/sites/default/files/imagecache/thumbnail/article/2012/12/16/justice_symbole.jpg, I have direct access to the file and that's what I want for all my files.

Can you help please?

wimleers commented 11 years ago

You can fix this by contributing an improved fileconveyor/transporters/transporter_cf.py file, with a modified alter_url() method. Allow more settings to be passed in so that users can define what they want their Amazon CloudFront URLs to look like, so that users can configure it in their config.xml file.

See https://github.com/wimleers/fileconveyor/blob/master/fileconveyor/transporters/transporter_cf.py