Skip to content

Commit

Permalink
fix: Add cache control headers only for successful requests
Browse files Browse the repository at this point in the history
  • Loading branch information
dvj1988 committed Sep 27, 2024
1 parent b1ed82d commit d1a69b8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,15 @@ parts.push(`
}
header /static/* {
Cache-Control "public, max-age=31536000, immutable"
# Match the response with status 200
@successful {
status 200
}
# Cache the response for 1 year if the response is successful
# @successful {
Cache-Control "public, max-age=31536000, immutable"
# }
}
request_body {
Expand Down

0 comments on commit d1a69b8

Please sign in to comment.