diff --git a/lib/fastly-rails/client.rb b/lib/fastly-rails/client.rb index 79122fd..3d35991 100644 --- a/lib/fastly-rails/client.rb +++ b/lib/fastly-rails/client.rb @@ -1,4 +1,5 @@ require 'fastly' +require 'uri' module FastlyRails # A simple wrapper around the fastly-ruby client. @@ -13,7 +14,7 @@ def purge_by_key(key) end def purge_url(key) - "/service/#{FastlyRails.service_id}/purge/#{key}" + "/service/#{FastlyRails.service_id}/purge/#{URI.escape(key)}" end end end