summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2013-02-14 19:23:29 +0100
committerLukas Reschke <lukas@statuscode.ch>2013-02-14 20:42:26 +0100
commit0f7c6c00ce0c65b9429520e94e6857e4b74de52f (patch)
treefbb3be7cefc41b3514f7ddf199b6d93887540e8f
parente91ec52ebebca9c3ed3528a6db4dd1185407678e (diff)
downloadnextcloud-server-0f7c6c00ce0c65b9429520e94e6857e4b74de52f.tar.gz
nextcloud-server-0f7c6c00ce0c65b9429520e94e6857e4b74de52f.zip
Invalidate existing HSTS headers
-rw-r--r--lib/base.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index 8b5ceeeab3b..e5da51efd54 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -200,6 +200,11 @@ class OC{
header("Location: $url");
exit();
}
+ } else {
+ // Invalidate HSTS headers
+ if (OC_Request::serverProtocol() === 'https') {
+ header('Strict-Transport-Security: max-age=0');
+ }
}
}