Skip to content

Commit

Permalink
add X-LitCal-Generated header
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed Mar 25, 2024
1 parent 39e0aee commit 482e641
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/LitCalAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -2860,7 +2860,9 @@ private function generateResponse() {
if (!empty( $_SERVER['HTTP_IF_NONE_MATCH'] ) && $_SERVER['HTTP_IF_NONE_MATCH'] === $responseHash) {
header( $_SERVER[ "SERVER_PROTOCOL" ] . " 304 Not Modified" );
header('Content-Length: 0');
header('X-LitCal-Generated: ClientCache');
} else {
header('X-LitCal-Generated: Calculation');
echo $response;
}
die();
Expand Down Expand Up @@ -2942,7 +2944,9 @@ public function Init(){
if (!empty( $_SERVER['HTTP_IF_NONE_MATCH'] ) && $_SERVER['HTTP_IF_NONE_MATCH'] === $responseHash) {
header( $_SERVER[ "SERVER_PROTOCOL" ] . " 304 Not Modified" );
header('Content-Length: 0');
header('X-LitCal-Generated: ClientCache');
} else {
header('X-LitCal-Generated: ServerCache');
echo $response;
}
die();
Expand Down

0 comments on commit 482e641

Please sign in to comment.