Browse Source

Use System.currentTimeMillis() in AbstractSockJsService

Closes gh-25447
pull/25461/head
XenoAmess 4 years ago committed by GitHub
parent
commit
e4a139e70e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java

2
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java

@ -510,7 +510,7 @@ public abstract class AbstractSockJsService implements SockJsService, CorsConfig @@ -510,7 +510,7 @@ public abstract class AbstractSockJsService implements SockJsService, CorsConfig
protected void addCacheHeaders(ServerHttpResponse response) {
response.getHeaders().setCacheControl("public, max-age=" + ONE_YEAR);
response.getHeaders().setExpires(new Date().getTime() + ONE_YEAR * 1000);
response.getHeaders().setExpires(System.currentTimeMillis() + ONE_YEAR * 1000);
}
protected void addNoCacheHeaders(ServerHttpResponse response) {

Loading…
Cancel
Save