Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2013-02-14 22:23:29 +0400
committerLukas Reschke <lukas@statuscode.ch>2013-02-14 22:23:29 +0400
commitbe194c5b5bef563ea38e85f784e6e9a3e8f181e1 (patch)
tree779794fb4d3dfdadb08e6ecaa298f6f230157476 /lib/base.php
parentf4c9d4c06797a5c9e2f30d20a8e13686e98dd7f9 (diff)
Invalidate existing HSTS headers
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index fd9a1d41121..ff95a87e438 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -231,6 +231,11 @@ class OC {
header("Location: $url");
exit();
}
+ } else {
+ // Invalidate HSTS headers
+ if (OC_Request::serverProtocol() === 'https') {
+ header('Strict-Transport-Security: max-age=0');
+ }
}
}