activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1440558 - in /activemq/activemq-apollo/trunk/apollo-web/src/main: scala/org/apache/activemq/apollo/web/StaticContentFilter.scala webapp/console/js/app.js
Date Wed, 30 Jan 2013 17:53:30 GMT
Author: chirino
Date: Wed Jan 30 17:53:29 2013
New Revision: 1440558

URL: http://svn.apache.org/viewvc?rev=1440558&view=rev
Log:
Disable caching of dynamic content and make sure the session id is passed along in ajax requests.

Modified:
    activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/StaticContentFilter.scala
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/js/app.js

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/StaticContentFilter.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/StaticContentFilter.scala?rev=1440558&r1=1440557&r2=1440558&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/StaticContentFilter.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/StaticContentFilter.scala
Wed Jan 30 17:53:29 2013
@@ -78,6 +78,10 @@ class StaticContentFilter extends Filter
             if (static_content_exists(req)) {
               static_content_servlet.service(req, res)
             } else {
+              // not static content? then it must be dynamic, lets default
+              // headers so that results are not cached by the browser.
+              res.setHeader("Cache-Control", "max-age=0, no-cache, must-revalidate, proxy-revalidate,
private")
+              res.setHeader("Pragma", "no-cache")
               chain.doFilter(req, res)
             }
           case _ => chain.doFilter(req, res)

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/js/app.js
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/js/app.js?rev=1440558&r1=1440557&r2=1440558&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/js/app.js (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/js/app.js Wed Jan 30
17:53:29 2013
@@ -150,6 +150,9 @@ App = Em.Application.create({
       headers: {
         AuthPrompt:'false',
       },
+      xhrFields: {
+        withCredentials: true
+      },
       dataType: 'json',
       success: function(data, textStatus, jqXHR){
         App.BrokerController.set("offline", false);
@@ -219,6 +222,9 @@ App.LoginController = Em.Controller.crea
       headers: {
         AuthPrompt:'false',
       },
+      xhrFields: {
+        withCredentials: true
+      },
       data:{
         username: username,
         password: password
@@ -801,6 +807,9 @@ App.ConfigurationController = Ember.Cont
       headers: {
         AuthPrompt:'false',
       },
+      xhrFields: {
+        withCredentials: true
+      },
       headers: {
         "Accept":"application/octet-stream",
       },



Mime
View raw message