fix a bug caused by a redirection when Steam is used within the Locomotive engine
did
committed Jun 10, 2015
commit 4926f955c71c13abdbdccebee7816e9118cfbf54
Showing 2
changed files with
2 additions
and 2 deletions
locomotive/steam.rb b/lib/locomotive/steam.rb
+1
-1
| @@ | @@ -19,7 +19,7 @@ module Locomotive |
| CONTENT_ENTRY_ENGINE_CLASS_NAME = /^Locomotive::ContentEntry(.*)$/o | |
| - | IsHTTP = /^https?:\/\//o |
| + | IsHTTP = /\Ahttps?:\/\//o |
| class << self | |
| attr_writer :configuration | |
locomotive/steam/middlewares/helpers.rb b/lib/locomotive/steam/middlewares/helpers.rb
+1
-1
| @@ | @@ -18,7 +18,7 @@ module Locomotive::Steam |
| end | |
| def redirect_to(location, type = 301) | |
| - | _location = mounted_on && (location =~ Steam::IsHTTP).nil? ? "#{mounted_on}#{location}" : location |
| + | _location = mounted_on && (location =~ Locomotive::Steam::IsHTTP).nil? ? "#{mounted_on}#{location}" : location |
| self.log "Redirected to #{_location}".blue | |