Images not rendered with secure connection to Amazon S3
<p>I am creating a PDF which contains images which are stored on Amazon S3.
My Rails application uses https, so also the URL to the S3 image is https, which is configured in <code>production.rb</code>:</p>

<pre><code>config.paperclip_defaults = {
  :storage =&gt; :s3,
  :s3_protocol =&gt; :https
}
</code></pre>

<p>The issue is that the S3 bucket has a security bucket policy that it only shows the image when it is coming from my web domain. This works well when showing the image in the view, because the referer is then my web domain which is whitelisted.</p>

<p>The issue when creating the PDF is that <code>wicked_pdf</code> tries to retrieve the image, but S3 can't see it is coming from my web domain and returns a <code>403 Forbidden</code>. So what can I do to solve this?</p>