Add more cache-control headers to sql.php
This commit is contained in:
parent
b625af695c
commit
ceb31b68eb
|
@ -162,6 +162,8 @@ if (startsWith($path, "/maps/")) {
|
||||||
|
|
||||||
// return result
|
// return result
|
||||||
if ($line = $statement->fetch()) {
|
if ($line = $statement->fetch()) {
|
||||||
|
header("Cache-Control: public,max-age=86400");
|
||||||
|
|
||||||
if ($compression !== "none")
|
if ($compression !== "none")
|
||||||
header("Content-Encoding: $compression");
|
header("Content-Encoding: $compression");
|
||||||
if ($lod === 0) {
|
if ($lod === 0) {
|
||||||
|
@ -196,6 +198,7 @@ if (startsWith($path, "/maps/")) {
|
||||||
$statement->execute();
|
$statement->execute();
|
||||||
|
|
||||||
if ($line = $statement->fetch()) {
|
if ($line = $statement->fetch()) {
|
||||||
|
header("Cache-Control: public,max-age=86400");
|
||||||
header("Content-Type: ".getMimeType($mapPath));
|
header("Content-Type: ".getMimeType($mapPath));
|
||||||
send($line["value"]);
|
send($line["value"]);
|
||||||
exit;
|
exit;
|
||||||
|
|
Loading…
Reference in New Issue