• Brian Clozel's avatar
    Add spring.web.resources.cache.use-last-modified · f0a6128d
    Brian Clozel authored
    Prior to this commit, packaging a Spring Boot application as a container
    image with Cloud Native Buildpacks could result in unwanted browser
    caching behavior, with "Last-Modified" HTTP response headers pointing to
    dates in the far past.
    
    This is due to CNB resetting the last-modified date metadata for static
    files (for build reproducibility and container layer caching) and Spring
    static resource handling relying on that information when serving static
    resources.
    
    This commit introduces a new configuration property
    `spring.web.resources.cache.use-last-modified` that can be used to
    disable this behavior in Spring if the application is meant to run as a
    container image built by CNB.
    
    The default value for this property remains `true` since this remains
    the default value in Spring Framework and using that information in
    other deployment models is a perfectly valid use case.
    
    Fixes gh-24099
    f0a6128d
Name
Last commit
Last update
.github Loading commit data...
buildSrc Loading commit data...
ci Loading commit data...
eclipse Loading commit data...
git/hooks Loading commit data...
gradle/wrapper Loading commit data...
idea Loading commit data...
spring-boot-project Loading commit data...
spring-boot-tests Loading commit data...
src Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
SUPPORT.adoc Loading commit data...
build.gradle Loading commit data...
gradle.properties Loading commit data...
gradlew Loading commit data...
gradlew.bat Loading commit data...
settings.gradle Loading commit data...