Skip to content

Commit 1f76de1

Browse files
committed
TRUNK-6051 Adding more csrfguard code documentation
1 parent 40e464b commit 1f76de1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/src/main/java/org/openmrs/web/filter/OpenmrsFilter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ protected void doFilterInternal(HttpServletRequest httpRequest, HttpServletRespo
9595
httpSession.setAttribute("locale", userContext.getLocale());
9696

9797
//TODO We do not cache the csrfguard javascript file because it contains the
98-
//csrf token that is dynamically embedded in forms.
98+
//csrf token that is dynamically embedded in forms. For this to work,
99+
//the OpenmrsFilter should be before the CSRFGuard filter in web.xml
99100
if (httpRequest.getRequestURI().endsWith("csrfguard")) {
100101
httpResponse.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
101102
httpResponse.setHeader("Pragma", "no-cache"); // HTTP 1.0.

0 commit comments

Comments
 (0)