<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Ruby on Rails, London - The Blog by Dynamic50</title>
	<atom:link href="http://blog.dynamic50.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dynamic50.com</link>
	<description>Ruby on Rails, London - The Blog by Dynamic50</description>
	<lastBuildDate>Sat, 28 Jan 2012 04:38:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on SSL on wildcard domains on Heroku using GoDaddy by Frank</title>
		<link>http://blog.dynamic50.com/2011/02/15/ssl-on-wildcard-domains-on-heroku-using-godaddy/comment-page-1/#comment-4740</link>
		<dc:creator>Frank</dc:creator>
		<pubDate>Sat, 28 Jan 2012 04:38:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynamic50.com/?p=1037#comment-4740</guid>
		<description>So i guess the question i have is:

can i secure my domain &quot;www.domain.com&quot; so that it looks like &quot;https://www.domain.com&quot; on heroku with this wildcard SSl or is that impossible?</description>
		<content:encoded><![CDATA[<p>So i guess the question i have is:</p>
<p>can i secure my domain &#8220;www.domain.com&#8221; so that it looks like &#8220;<a href="https://www.domain.com&#038;#8221" rel="nofollow">https://www.domain.com&#038;#8221</a>; on heroku with this wildcard SSl or is that impossible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Redirect all requests for www. to root domain with Heroku by David</title>
		<link>http://blog.dynamic50.com/2011/02/22/redirect-all-requests-for-www-to-root-domain-with-heroku/comment-page-1/#comment-4736</link>
		<dc:creator>David</dc:creator>
		<pubDate>Tue, 24 Jan 2012 18:34:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynamic50.com/?p=1072#comment-4736</guid>
		<description>I apologize, the correct snippet is:
 def call(env)
    request = Rack::Request.new(env)
    unless request.ssl?
      url = request.url.sub(&quot;http://&quot;,&quot;https://&quot;)
      url = url.sub(&quot;//domain&quot;, &quot;//www.domain&quot;)
      [301, {&quot;Location&quot; =&gt; url}, self]
    else
      @app.call(env)
    end
  end</description>
		<content:encoded><![CDATA[<p>I apologize, the correct snippet is:<br />
 def call(env)<br />
    request = Rack::Request.new(env)<br />
    unless request.ssl?<br />
      url = request.url.sub(&#8220;<a href="http://&#8221;,&#8221;https://&#038;#8221" rel="nofollow">http://&#8221;,&#8221;https://&#038;#8221</a>;)<br />
      url = url.sub(&#8220;//domain&#8221;, &#8220;//www.domain&#8221;)<br />
      [301, {"Location" =&gt; url}, self]<br />
    else<br />
      @app.call(env)<br />
    end<br />
  end</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Redirect all requests for www. to root domain with Heroku by David</title>
		<link>http://blog.dynamic50.com/2011/02/22/redirect-all-requests-for-www-to-root-domain-with-heroku/comment-page-1/#comment-4735</link>
		<dc:creator>David</dc:creator>
		<pubDate>Tue, 24 Jan 2012 18:32:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynamic50.com/?p=1072#comment-4735</guid>
		<description>We purchased a wildcard SSL cert for our domain *.domain.com. If the customer comes to http://domain.com, however, the force_ssl option in Rack causes redirection to https://domain.com (which results in a certificate error since it doesn&#039;t match.) Your solution offered an example of how to build the domain redirect in Rack. My final script (below) does both together (see my comment above for why I didn&#039;t continue using the force_ssl option.) Anyway, for what it&#039;s worth, this will ensure that anyone using the URL domain.com is redirected to https://www.domain.com. This also ensures that any access to the site is redirected to SSL if not already. The one case that is not handled, where someone tries https://domain.com, is a red-herring because the customer will have already seen the certificate warning before this code is run. In that case the customer has accepted the certificate mismatch and there is no benefit in redirecting them.

Here&#039;s the final snippet:
  def call(env)
    request = Rack::Request.new(env)
    unless request.ssl?
      url = request.url.sub(&quot;http://&quot;,&quot;https://&quot;)
      url = url.sub(&quot;//www.&quot;, &quot;//&quot;)
      [301, {&quot;Location&quot; =&gt; url}, self]
    else
      @app.call(env)
    end
  end</description>
		<content:encoded><![CDATA[<p>We purchased a wildcard <span class="caps">SSL </span>cert for our domain *.domain.com. If the customer comes to <a href="http://domain.com" rel="nofollow">http://domain.com</a>, however, the force_ssl option in Rack causes redirection to <a href="https://domain.com" rel="nofollow">https://domain.com</a> (which results in a certificate error since it doesn&#8217;t match.) Your solution offered an example of how to build the domain redirect in Rack. My final script (below) does both together (see my comment above for why I didn&#8217;t continue using the force_ssl option.) Anyway, for what it&#8217;s worth, this will ensure that anyone using the <span class="caps">URL </span>domain.com is redirected to <a href="https://www.domain.com" rel="nofollow">https://www.domain.com</a>. This also ensures that any access to the site is redirected to <span class="caps">SSL </span>if not already. The one case that is not handled, where someone tries <a href="https://domain.com" rel="nofollow">https://domain.com</a>, is a red-herring because the customer will have already seen the certificate warning before this code is run. In that case the customer has accepted the certificate mismatch and there is no benefit in redirecting them.</p>
<p>Here&#8217;s the final snippet:<br />
  def call(env)<br />
    request = Rack::Request.new(env)<br />
    unless request.ssl?<br />
      url = request.url.sub(&#8220;<a href="http://&#8221;,&#8221;https://&#038;#8221" rel="nofollow">http://&#8221;,&#8221;https://&#038;#8221</a>;)<br />
      url = url.sub(&#8220;//www.&#8221;, &#8220;//&#8221;)<br />
      [301, {"Location" =&gt; url}, self]<br />
    else<br />
      @app.call(env)<br />
    end<br />
  end</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Redirect all requests for www. to root domain with Heroku by David</title>
		<link>http://blog.dynamic50.com/2011/02/22/redirect-all-requests-for-www-to-root-domain-with-heroku/comment-page-1/#comment-4734</link>
		<dc:creator>David</dc:creator>
		<pubDate>Tue, 24 Jan 2012 17:28:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynamic50.com/?p=1072#comment-4734</guid>
		<description>I&#039;m having an issue with this. Rack seems to enforce the config.force_ssl =true before the patch is run.  Am I missing something?

From config/environments/production.rb
 35   config.middleware.use &quot;WwwMiddleware&quot;
 36 
 37   # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
 38   config.force_ssl = true</description>
		<content:encoded><![CDATA[<p>I&#8217;m having an issue with this. Rack seems to enforce the config.force_ssl =true before the patch is run.  Am I missing something?</p>
<p>From config/environments/production.rb<br />
 35   config.middleware.use &#8220;WwwMiddleware&#8221;<br />
 36 <br />
 37   # Force all access to the app over <span class="caps">SSL, </span>use Strict-Transport-Security, and use secure cookies.<br />
 38   config.force_ssl = true</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Redirect all requests for www. to root domain with Heroku by William Denniss</title>
		<link>http://blog.dynamic50.com/2011/02/22/redirect-all-requests-for-www-to-root-domain-with-heroku/comment-page-1/#comment-4730</link>
		<dc:creator>William Denniss</dc:creator>
		<pubDate>Thu, 19 Jan 2012 06:54:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynamic50.com/?p=1072#comment-4730</guid>
		<description>@Tania van Wyk de Vries, you just need to add each subdomain as an add-on domain to heroku.  i.e. add yourdomain.com and www.yourdomain.com.  No paid add-on needed if you are happy adding all the subdomains you wish to use!</description>
		<content:encoded><![CDATA[<p>@Tania van Wyk de Vries, you just need to add each subdomain as an add-on domain to heroku.  i.e. add yourdomain.com and <a href="http://www.yourdomain.com" rel="nofollow">http://www.yourdomain.com</a>.  No paid add-on needed if you are happy adding all the subdomains you wish to use!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Sitemap Generator for Ruby on Rails Applications by Alessandro Muraro</title>
		<link>http://blog.dynamic50.com/2010/01/27/sitemap-generator-for-ruby-on-rails-applications/comment-page-1/#comment-4726</link>
		<dc:creator>Alessandro Muraro</dc:creator>
		<pubDate>Sat, 03 Dec 2011 12:37:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynamic50.com/?p=732#comment-4726</guid>
		<description>Hello, i get an error,

undefined method `article_path&#039; for Sitemap:Class
/home/alex/Documents/Web/MYSITE/Rakefile:12

i added the lib in application.rb but now have no clue why it&#039;s not working... any hint?
Thanks a lot!</description>
		<content:encoded><![CDATA[<p>Hello, i get an error,</p>
<p>undefined method `article_path&#8217; for Sitemap:Class<br />
/home/alex/Documents/Web/MYSITE/Rakefile:12</p>
<p>i added the lib in application.rb but now have no clue why it&#8217;s not working&#8230; any hint?<br />
Thanks a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Redirect all requests for www. to root domain with Heroku by Eric</title>
		<link>http://blog.dynamic50.com/2011/02/22/redirect-all-requests-for-www-to-root-domain-with-heroku/comment-page-1/#comment-4725</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Fri, 02 Dec 2011 19:59:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynamic50.com/?p=1072#comment-4725</guid>
		<description>Awesome, this worked by copy paste - thanks a bunch!</description>
		<content:encoded><![CDATA[<p>Awesome, this worked by copy paste &#8211; thanks a bunch!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Redirect all requests for www. to root domain with Heroku by Federico</title>
		<link>http://blog.dynamic50.com/2011/02/22/redirect-all-requests-for-www-to-root-domain-with-heroku/comment-page-1/#comment-4724</link>
		<dc:creator>Federico</dc:creator>
		<pubDate>Tue, 29 Nov 2011 17:55:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynamic50.com/?p=1072#comment-4724</guid>
		<description>Thanks for this! Worked like a charm on a Rails 3.1 app.</description>
		<content:encoded><![CDATA[<p>Thanks for this! Worked like a charm on a Rails 3.1 app.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on SSL on wildcard domains on Heroku using GoDaddy by Jonathan Dance</title>
		<link>http://blog.dynamic50.com/2011/02/15/ssl-on-wildcard-domains-on-heroku-using-godaddy/comment-page-1/#comment-4722</link>
		<dc:creator>Jonathan Dance</dc:creator>
		<pubDate>Fri, 11 Nov 2011 01:13:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynamic50.com/?p=1037#comment-4722</guid>
		<description>Hello,

Your steps for combining / preparing your certificates for Heroku are incorrect. The steps should be as follows:

1. Combine your certificate with the GoDaddy bundle (gd_bundle.crt) which you can here: https://certs.godaddy.com/anonymous/repository.seam) to create your complete certificate:

cat yourdomain.com.crt gd_bundle.crt &gt; final.crt

2. Create a passphrase-free private key:

openssl rsa -in mykey.key -out final.key

3. You can now add your finished certificates to Heroku:

heroku ssl:add final.crt final.key

4. Then add your desired SSL addon:

heroku addons:add ssl:hostname

Thanks!
Heroku Support</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Your steps for combining / preparing your certificates for Heroku are incorrect. The steps should be as follows:</p>
<p>1. Combine your certificate with the GoDaddy bundle (gd_bundle.crt) which you can here: <a href="https://certs.godaddy.com/anonymous/repository.seam" rel="nofollow">https://certs.godaddy.com/anonymous/repository.seam</a>) to create your complete certificate:</p>
<p>cat yourdomain.com.crt gd_bundle.crt &gt; final.crt</p>
<p>2. Create a passphrase-free private key:</p>
<p>openssl rsa -in mykey.key -out final.key</p>
<p>3. You can now add your finished certificates to Heroku:</p>
<p>heroku ssl:add final.crt final.key</p>
<p>4. Then add your desired <span class="caps">SSL </span>addon:</p>
<p>heroku addons:add ssl:hostname</p>
<p>Thanks!<br />
Heroku Support</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Sitemap Generator for Ruby on Rails Applications by Rolando Alvarado</title>
		<link>http://blog.dynamic50.com/2010/01/27/sitemap-generator-for-ruby-on-rails-applications/comment-page-1/#comment-4721</link>
		<dc:creator>Rolando Alvarado</dc:creator>
		<pubDate>Tue, 08 Nov 2011 06:59:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dynamic50.com/?p=732#comment-4721</guid>
		<description>Nice work. Helps me a lot.</description>
		<content:encoded><![CDATA[<p>Nice work. Helps me a lot.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

