craftcms / google-cloud

Google Cloud Storage volume type for Craft CMS.
https://plugins.craftcms.com/google-cloud
MIT License
11 stars 10 forks source link

Unable to serve images via HTTPS #6

Closed cliveportman closed 5 years ago

cliveportman commented 5 years ago

I'm unable to get this plugin to serve images over https using {{ image.getUrl() }}. When opening an asset volume's settings, the Base URL is http:// and it doesn't seem to save. I've updated Volume.php to:

'urlPrefix' => 'https://storage.googleapis.com/'.$bucket->name().'/',

but it makes no difference. I've tried clearing caches, etc. Google Cloud Storage serves these images natually by HTTPS so I think the plugin is overwriting that but where?

brandonkelly commented 5 years ago

Have you tried changing the volume’s Base URL setting to begin with https:// ?

cliveportman commented 5 years ago

Thanks. I've tried on a different site and what you suggest works fine. On the site in question, I was saving it and receiving the Volume Saved message, but when viewing the settings again it hadn't actually saved the change. I was using the latest version of Craft at the time I created this issue. I've since updated to Craft 3.1.9.1 and it is now saving correctly so all is fine.