Skip to content

Commit

Permalink
add max-age=0
Browse files Browse the repository at this point in the history
  • Loading branch information
CH3CHO committed Dec 26, 2024
1 parent f69d662 commit eef03de
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/
package com.alibaba.higress.console;

import java.time.Duration;
import java.util.Arrays;
import java.util.List;

Expand All @@ -38,8 +39,8 @@ public class WebMvcInitializer implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/*").addResourceLocations("classpath:/static/")
.setCacheControl(CacheControl.noCache().mustRevalidate()).setUseLastModified(true).resourceChain(true)
.addResolver(new PathResourceResolver() {
.setCacheControl(CacheControl.noCache().maxAge(Duration.ZERO).mustRevalidate()).setUseLastModified(true)
.resourceChain(true).addResolver(new PathResourceResolver() {
@Override
protected Resource resolveResourceInternal(HttpServletRequest request, @NonNull String requestPath,
@NonNull List<? extends Resource> locations, @NonNull ResourceResolverChain chain) {
Expand Down

0 comments on commit eef03de

Please sign in to comment.