mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-02-23 12:23:58 +00:00
set cache control to 180 seconds for codeberg pages
This commit is contained in:
parent
cb590c7568
commit
b06dbbe075
@ -83,6 +83,8 @@ if (array_key_exists($ext, $mime_types)) {
|
||||
header("Content-Type: application/octet-stream");
|
||||
}
|
||||
|
||||
header("Cache-Control: public, max-age=180, immutable");
|
||||
|
||||
## We are executing command twice (first for send_response-checking, then for actual raw output to stream),
|
||||
## which seems wasteful, but it seems exec+echo cannot do raw binary output? Is this true?
|
||||
$command = "sh -c \"cd '$git_root' && /usr/bin/git show 'HEAD:$file_url'\"";
|
||||
|
Loading…
x
Reference in New Issue
Block a user