|
|
9a9096 |
--- java/org/apache/catalina/filters/CorsFilter.java.orig 2017-10-12 16:48:47.426952298 -0400
|
|
|
9a9096 |
+++ java/org/apache/catalina/filters/CorsFilter.java 2017-10-12 16:48:47.431952269 -0400
|
|
|
9a9096 |
@@ -297,6 +297,10 @@
|
|
|
9a9096 |
exposedHeadersString);
|
|
|
9a9096 |
}
|
|
|
9a9096 |
|
|
|
9a9096 |
+ // Indicate the response depends on the origin
|
|
|
9a9096 |
+ response.addHeader(CorsFilter.REQUEST_HEADER_VARY,
|
|
|
9a9096 |
+ CorsFilter.REQUEST_HEADER_ORIGIN);
|
|
|
9a9096 |
+
|
|
|
9a9096 |
// Forward the request down the filter chain.
|
|
|
9a9096 |
filterChain.doFilter(request, response);
|
|
|
9a9096 |
}
|
|
|
9a9096 |
@@ -998,6 +1002,13 @@
|
|
|
9a9096 |
"Access-Control-Allow-Headers";
|
|
|
9a9096 |
|
|
|
9a9096 |
// -------------------------------------------------- CORS Request Headers
|
|
|
9a9096 |
+
|
|
|
9a9096 |
+ /**
|
|
|
9a9096 |
+ * The Vary header indicates allows disabling proxy caching by indicating
|
|
|
9a9096 |
+ * the the response depends on the origin.
|
|
|
9a9096 |
+ */
|
|
|
9a9096 |
+ public static final String REQUEST_HEADER_VARY = "Vary";
|
|
|
9a9096 |
+
|
|
|
9a9096 |
/**
|
|
|
9a9096 |
* The Origin header indicates where the cross-origin request or preflight
|
|
|
9a9096 |
* request originates from.
|
|
|
9a9096 |
--- webapps/docs/changelog.xml.orig 2017-10-12 16:48:47.428952287 -0400
|
|
|
9a9096 |
+++ webapps/docs/changelog.xml 2017-10-12 16:50:08.718477877 -0400
|
|
|
9a9096 |
@@ -57,6 +57,16 @@
|
|
|
9a9096 |
They eventually become mixed with the numbered issues. (I.e., numbered
|
|
|
9a9096 |
issues do not "pop up" wrt. others).
|
|
|
9a9096 |
-->
|
|
|
9a9096 |
+<section name="Tomcat 7.0.76-3 (csutherl)">
|
|
|
9a9096 |
+ <subsection name="Catalina">
|
|
|
9a9096 |
+ <changelog>
|
|
|
9a9096 |
+ <fix>
|
|
|
9a9096 |
+ <bug>61101</bug>: CORS filter should set Vary header in response.
|
|
|
9a9096 |
+ Submitted by Rick Riemer. (remm)
|
|
|
9a9096 |
+ </fix>
|
|
|
9a9096 |
+ </changelog>
|
|
|
9a9096 |
+ </subsection>
|
|
|
9a9096 |
+</section>
|
|
|
9a9096 |
<section name="Tomcat 7.0.76-2 (csutherl)">
|
|
|
9a9096 |
<subsection name="Catalina">
|
|
|
9a9096 |
<changelog>
|