Tomcat返回的ExpiresFilter Expires是1969年12月31日,星期三

时间:2018-08-15 04:35:42

标签: java tomcat https

我有一个问题是Expires返回数据:使用ExpiresFilter时,CST,1969年12月31日,星期三18:00:00。在当地,工作很好。我不知道这是什么问题。

Cache-Control: private
Content-Security-Policy: default-src * data: 'unsafe-inline' 'unsafe-eval'
Date: Wed, 15 Aug 2018 03:56:56 GMT
Expires: Wed, 31 Dec 1969 18:00:00 CST
Last-Modified: Fri, 02 Feb 2018 02:49:18 GMT

web.xml

    <filter>
   <filter-name>ExpiresFilter</filter-name>
   <filter-class>org.apache.catalina.filters.ExpiresFilter</filter-class>
   <!-- # Images  -->
   <init-param>
      <param-name>ExpiresByType image</param-name>
      <param-value>access plus 1 year</param-value>
   </init-param>
   <!-- # CSS, JavaScript -->
   <init-param>
      <param-name>ExpiresByType text/css</param-name>
      <param-value>access plus 1 month</param-value>
   </init-param>
   <init-param>
      <param-name>ExpiresByType text/javascript</param-name>
      <param-value>access plus 1 month</param-value>
   </init-param>
   <init-param>
      <param-name>ExpiresByType application/javascript</param-name>
      <param-value>access plus 1 month</param-value>
   </init-param>
   <!-- # Others -->
   <init-param>
      <param-name>ExpiresByType application/pdf</param-name>
      <param-value>access plus 1 month</param-value>
   </init-param>
</filter>

<filter-mapping>
   <filter-name>ExpiresFilter</filter-name>
   <url-pattern>/*</url-pattern>
   <dispatcher>REQUEST</dispatcher>
</filter-mapping>

0 个答案:

没有答案