mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-01-19 08:57:55 +00:00
set cache control to 180 seconds for codeberg pages
This commit is contained in:
parent
cb590c7568
commit
b06dbbe075
1 changed files with 2 additions and 0 deletions
|
@ -83,6 +83,8 @@ if (array_key_exists($ext, $mime_types)) {
|
||||||
header("Content-Type: application/octet-stream");
|
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),
|
## 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?
|
## 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'\"";
|
$command = "sh -c \"cd '$git_root' && /usr/bin/git show 'HEAD:$file_url'\"";
|
||||||
|
|
Loading…
Reference in a new issue