]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2296 Sonar behind a HTTPS reverse proxy sometimes fall back to HTTP
authorJulien Lancelot <julien.lancelot@gmail.com>
Mon, 21 Jan 2013 14:21:22 +0000 (15:21 +0100)
committerJulien Lancelot <julien.lancelot@gmail.com>
Mon, 21 Jan 2013 14:21:39 +0000 (15:21 +0100)
sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb
sonar-server/src/main/webapp/WEB-INF/config/routes.rb

index dc8ab3d5d6d5e234c38608af8d5f4d4b49c4979c..2f765f95f1ba1e24e593b9c769adc7a3f94ace86 100644 (file)
@@ -212,4 +212,10 @@ class ApplicationController < ActionController::Base
   def category_name(category)
     message("property.category.#{category}", :default => category)
   end
+
+  # Force url_to to use relative path
+  def default_url_options(options)
+    {:only_path => true}
+  end
+
 end
index 6cfed6caea7468bff0b3a8d6c0326ba74f98dfa4..642c8d9e340ff25e36a6a9a30e834bbc276146ab 100644 (file)
@@ -30,7 +30,7 @@ ActionController::Routing::Routes.draw do |map|
   map.resources 'properties', :path_prefix => 'api', :controller => 'api/properties', :requirements => { :id => /.*/ }
 
   # home page
-  map.home '', :controller => :dashboard, :action => :index
+  map.home '', :controller => :dashboard, :action => :index, :only_path => true
   map.root :controller => :dashboard, :action => :index
 
   # page plugins