]> git.openstreetmap.org Git - rails.git/commitdiff
Mark redirects which need to be open with allow_other_host
authorTom Hughes <tom@compton.nu>
Wed, 9 Mar 2022 22:43:02 +0000 (22:43 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 9 Mar 2022 22:43:02 +0000 (22:43 +0000)
app/controllers/export_controller.rb
app/controllers/oauth_controller.rb

index d901dccc9e9a721570c1d91360e9e9ce420c1bf5..94851de96485741758d681a1247be029c402dc17 100644 (file)
@@ -21,7 +21,7 @@ class ExportController < ApplicationController
       format = params[:mapnik_format]
       scale = params[:mapnik_scale]
 
-      redirect_to "https://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}", :allow_other_host => true
     end
   end
 
index 7ab7f68359c52e7498ee6e5b0e15dcdda2dedeb1..cd7e48277a2517b23e49af4cdb31eddfd396a762 100644 (file)
@@ -66,7 +66,7 @@ class OauthController < ApplicationController
 
           @redirect_url.query += "&oauth_verifier=#{@token.verifier}" unless @token.oauth10?
 
-          redirect_to @redirect_url.to_s
+          redirect_to @redirect_url.to_s, :allow_other_host => true
         end
       else
         @token.invalidate!