MDL-28484 core_lib: Add function for https detection

Signed-off-by: Tony Butler <[email protected]>
This commit is contained in:
Tony Butler
2014-10-03 13:02:29 +01:00
parent 6597413d41
commit 1e31f11852
19 changed files with 35 additions and 21 deletions
+1 -1
View File
@@ -476,7 +476,7 @@ class csv_export_writer {
// For text based formats - we cannot test the output with behat if we force a file download.
return;
}
if (strpos($CFG->wwwroot, 'https://') === 0) { //https sites - watch out for IE! KB812935 and KB316431
if (is_https()) { // HTTPS sites - watch out for IE! KB812935 and KB316431.
header('Cache-Control: max-age=10');
header('Pragma: ');
} else { //normal http - prevent caching at all cost