Use https when redirecting to the render server
authorTom Hughes <tom@compton.nu>
Fri, 9 Feb 2018 22:31:45 +0000 (22:31 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 9 Feb 2018 22:31:45 +0000 (22:31 +0000)
app/controllers/export_controller.rb
test/controllers/export_controller_test.rb

index 1b7beaa..afdf4d8 100644 (file)
@@ -19,7 +19,7 @@ class ExportController < ApplicationController
       format = params[:mapnik_format]
       scale = params[:mapnik_scale]
 
-      redirect_to "http://render.openstreetmap.org/cgi-bin/export?bbox=#{bbox}&scale=#{scale}&format=#{format}"
+      redirect_to "https://render.openstreetmap.org/cgi-bin/export?bbox=#{bbox}&scale=#{scale}&format=#{format}"
     end
   end
 
index 972e08c..94cf6cf 100644 (file)
@@ -27,7 +27,7 @@ class ExportControllerTest < ActionController::TestCase
   def test_finish_mapnik
     get :finish, :params => { :minlon => 0, :minlat => 50, :maxlon => 1, :maxlat => 51, :format => "mapnik", :mapnik_format => "test", :mapnik_scale => "12" }
     assert_response :redirect
-    assert_redirected_to "http://render.openstreetmap.org/cgi-bin/export?bbox=0.0,50.0,1.0,51.0&scale=12&format=test"
+    assert_redirected_to "https://render.openstreetmap.org/cgi-bin/export?bbox=0.0,50.0,1.0,51.0&scale=12&format=test"
   end
 
   ##