From: martyntaylor <[email protected]>

---
 src/app/controllers/application_controller.rb |    7 +++++++
 src/app/views/user_sessions/prelogout.html    |    9 +++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)
 create mode 100644 src/app/views/user_sessions/prelogout.html

diff --git a/src/app/controllers/application_controller.rb 
b/src/app/controllers/application_controller.rb
index 0b8a015..c959d44 100644
--- a/src/app/controllers/application_controller.rb
+++ b/src/app/controllers/application_controller.rb
@@ -36,6 +36,8 @@ class ApplicationController < ActionController::Base
   rescue_from ActionError, :with => :handle_action_error
   rescue_from PartialSuccessError, :with => :handle_partial_success_error
 
+  before_filter :no_cache
+
   def choose_layout
     return nil if params[:ajax]
     if(params[:component_layout])
@@ -230,4 +232,9 @@ class ApplicationController < ActionController::Base
     redirect_to(default || session[:return_to])
     session[:return_to] = nil
   end
+
+  def no_cache
+    response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, 
must-revalidate"
+    response.headers["Pragma"] = "no-cache"
+  end
 end
diff --git a/src/app/views/user_sessions/prelogout.html 
b/src/app/views/user_sessions/prelogout.html
new file mode 100644
index 0000000..a78a32b
--- /dev/null
+++ b/src/app/views/user_sessions/prelogout.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+  <head>
+  <title>Your Page Title</title>
+    <meta http-equiv="REFRESH" content='0; url=http://localhost:3000/logout'>
+  </HEAD>
+  <BODY>
+  </BODY>
+</HTML>
-- 
1.7.2.3

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to