diff options
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/api/server_controller.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/server_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/server_controller.rb index f50ec79f4fa..b033007963c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/server_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/server_controller.rb @@ -21,6 +21,7 @@ class Api::ServerController < Api::ApiController skip_before_filter :check_authentication, :except => 'system' before_filter :admin_required, :only => 'system' + before_filter :set_cache_buster, :only => 'index' def key render :text => Java::OrgSonarServerPlatform::Platform.getServer().getId() @@ -79,4 +80,10 @@ class Api::ServerController < Api::ApiController hash[:status_msg]='Not connected to database' end end + + def set_cache_buster + response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate" + response.headers["Pragma"] = "no-cache" + response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT" + end end |