mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
No-cache HTTP response headers added to appropriate web-client servlets.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5827 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -188,6 +188,15 @@ public abstract class BaseServlet extends HttpServlet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply the headers required to disallow caching of the response in the browser
|
||||||
|
*/
|
||||||
|
public static void setNoCacheHeaders(HttpServletResponse res)
|
||||||
|
{
|
||||||
|
res.setHeader("Cache-Control", "no-cache");
|
||||||
|
res.setHeader("Pragma", "no-cache");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the specified JSP file is valid for a redirect after login.
|
* Returns true if the specified JSP file is valid for a redirect after login.
|
||||||
* Only a specific sub-set of the available JSPs are valid to jump directly too after a
|
* Only a specific sub-set of the available JSPs are valid to jump directly too after a
|
||||||
|
@@ -96,6 +96,8 @@ public class CommandServlet extends BaseServlet
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setNoCacheHeaders(res);
|
||||||
|
|
||||||
uri = uri.substring(req.getContextPath().length());
|
uri = uri.substring(req.getContextPath().length());
|
||||||
StringTokenizer t = new StringTokenizer(uri, "/");
|
StringTokenizer t = new StringTokenizer(uri, "/");
|
||||||
int tokenCount = t.countTokens();
|
int tokenCount = t.countTokens();
|
||||||
|
@@ -100,6 +100,8 @@ public class ExternalAccessServlet extends BaseServlet
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setNoCacheHeaders(res);
|
||||||
|
|
||||||
uri = uri.substring(req.getContextPath().length());
|
uri = uri.substring(req.getContextPath().length());
|
||||||
StringTokenizer t = new StringTokenizer(uri, "/");
|
StringTokenizer t = new StringTokenizer(uri, "/");
|
||||||
int tokenCount = t.countTokens();
|
int tokenCount = t.countTokens();
|
||||||
|
@@ -114,6 +114,8 @@ public class TemplateContentServlet extends BaseTemplateContentServlet
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setNoCacheHeaders(res);
|
||||||
|
|
||||||
processTemplateRequest(req, res, true);
|
processTemplateRequest(req, res, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user