wip
This commit is contained in:
Regular → Executable
+5
-3
@@ -375,13 +375,15 @@ class MLS_Image_Endpoint {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Send headers
|
||||
// Send headers - remove any no-cache headers WordPress may have added
|
||||
header_remove('Pragma');
|
||||
header('Pragma: public');
|
||||
header('Content-Type: ' . $mime_type);
|
||||
header('Content-Length: ' . $file_size);
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $last_modified) . ' GMT');
|
||||
header('ETag: "' . $etag . '"');
|
||||
header('Cache-Control: public, max-age=31536000'); // 1 year
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 31536000) . ' GMT');
|
||||
header('Cache-Control: public, max-age=3600'); // 1 hour
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT');
|
||||
|
||||
// Stream file
|
||||
readfile($path);
|
||||
|
||||
Reference in New Issue
Block a user