summaryrefslogtreecommitdiffstats
path: root/sonar-server/src
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-01-21 15:21:22 +0100
committerJulien Lancelot <julien.lancelot@gmail.com>2013-01-21 15:21:39 +0100
commitf9675acba2cc21d3c8909493964c000da00b8512 (patch)
treef22d1de1cbf1d6f23421fba92610af4af2ce6a06 /sonar-server/src
parenteb09f615d5ab981e45b69209acadcce82ac6b386 (diff)
downloadsonarqube-f9675acba2cc21d3c8909493964c000da00b8512.tar.gz
sonarqube-f9675acba2cc21d3c8909493964c000da00b8512.zip
SONAR-2296 Sonar behind a HTTPS reverse proxy sometimes fall back to HTTP
Diffstat (limited to 'sonar-server/src')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb6
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/config/routes.rb2
2 files changed, 7 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb
index dc8ab3d5d6d..2f765f95f1b 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb
@@ -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
diff --git a/sonar-server/src/main/webapp/WEB-INF/config/routes.rb b/sonar-server/src/main/webapp/WEB-INF/config/routes.rb
index 6cfed6caea7..642c8d9e340 100644
--- a/sonar-server/src/main/webapp/WEB-INF/config/routes.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/config/routes.rb
@@ -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