Skip to content

Commit

Permalink
Add immutable directive to cache-control header (#440)
Browse files Browse the repository at this point in the history
Same as elixir-plug/plug#1205

That's a good practice since the assets are hashed
  • Loading branch information
leandrocp committed Mar 1, 2024
1 parent a39af07 commit 78d772d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/phoenix/live_dashboard/controllers/assets.ex
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ defmodule Phoenix.LiveDashboard.Assets do

conn
|> put_resp_header("content-type", content_type)
|> put_resp_header("cache-control", "public, max-age=31536000")
|> put_resp_header("cache-control", "public, max-age=31536000, immutable")
|> put_private(:plug_skip_csrf_protection, true)
|> send_resp(200, contents)
|> halt()
Expand Down

0 comments on commit 78d772d

Please sign in to comment.