title: Paperclip including bucket name in cloudfront url
body: <p>When I try to use Cloudfront as my CDN the url incorrectly includes the bucket name such as</p>
  
  <pre><code>cloudfronturl.net/bucketname/pathToImage
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>cloudfronturl.net/pathToImage
  </code></pre>
  
  <p>on my image model</p>
  
  <pre><code>:s3_credentials =&gt; {
      :bucket            =&gt; ENV['AWS_BUCKET'],
      :access_key_id     =&gt; ENV['AWS_ACCESS_KEY_ID'],
      :secret_access_key =&gt; ENV['AWS_SECRET_ACCESS_KEY'],
      :url =&gt; ':s3_domain_url',
      :s3_host_name =&gt; ENV['CLOUDFRONT_URL']
  }
  </code></pre>
  
  <p>I could try using a gsub on the image urls to replace <code>['AWS_BUCKET']+"/"</code> but is there a way to configure my cloudfront or paperclip to do this automatically?</p>