You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2020/02/24 19:36:35 UTC
[lucene-site] branch master updated: LUCENE-9227: Redirect
HTTP->HTTPS,
set Strict-Transport-Security header when served via HTTPS (with short
lifetime for now)
This is an automated email from the ASF dual-hosted git repository.
uschindler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-site.git
The following commit(s) were added to refs/heads/master by this push:
new 2b33f27 LUCENE-9227: Redirect HTTP->HTTPS, set Strict-Transport-Security header when served via HTTPS (with short lifetime for now)
2b33f27 is described below
commit 2b33f27f26e08dfdfff50167e2c696b7a736c5aa
Author: Uwe Schindler <us...@apache.org>
AuthorDate: Mon Feb 24 20:36:22 2020 +0100
LUCENE-9227: Redirect HTTP->HTTPS, set Strict-Transport-Security header when served via HTTPS (with short lifetime for now)
---
themes/lucene/templates/htaccess.template | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/themes/lucene/templates/htaccess.template b/themes/lucene/templates/htaccess.template
index b4552b0..b073e26 100644
--- a/themes/lucene/templates/htaccess.template
+++ b/themes/lucene/templates/htaccess.template
@@ -16,6 +16,13 @@
RewriteEngine on
RewriteBase /
+<If "%{HTTPS} == 'on'">
+ RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
+</If>
+<Else>
+ Header always set Strict-Transport-Security "max-age=300"
+</Else>
+
### Pre-CMS site redirects
# DOAP file redirects to source repository