Skip to content

Commit

Permalink
feat: add cache-control header
Browse files Browse the repository at this point in the history
  • Loading branch information
arcs- committed Sep 30, 2024
1 parent 61bf32d commit fd79206
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Http/Controllers/PublicController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ public function serve()
$site = \Request::segment(3);
$path = LangFileService::path($site);

return response()->file($path);
return response()
->file($path, [
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#no-cache
// does not mean we don't cache it, just that it has to revalidate
'Cache-Control' => 'no-cache'
]);
}
}

0 comments on commit fd79206

Please sign in to comment.