jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject [jmeter] branch master updated: Found a nicer way to forward to https on another via .htaccess
Date Wed, 19 Feb 2020 21:00:09 GMT
This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 2b57a2b  Found a nicer way to forward to https on another via .htaccess
2b57a2b is described below

commit 2b57a2b9c3aa29feb0c4cf3694c31b1ca2b7a159
Author: Felix Schumacher <felix.schumacher@internetallee.de>
AuthorDate: Wed Feb 19 21:59:52 2020 +0100

    Found a nicer way to forward to https on another via .htaccess
---
 xdocs/.htaccess | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/xdocs/.htaccess b/xdocs/.htaccess
index a92e2ce..327e6cb 100644
--- a/xdocs/.htaccess
+++ b/xdocs/.htaccess
@@ -1,6 +1,16 @@
 RewriteEngine On
 
-RewriteCond %{HTTP_HOST} ^jmeter\.apache\.org [NC]
-RewriteCond %{HTTPS} !on
+# Redirect http to https
+# From Cordova PMC Member raphinesse
+# https://s.apache.org/An8s
+
+# If we receive a forwarded http request from a proxy...
+RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]
+
+# ...or just a plain old http request directly from the client
+RewriteCond %{HTTP:X-Forwarded-Proto} =""
+RewriteCond %{HTTPS} !=on
+
+# Redirect to https version
+RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L]
 
-RewriteRule ^(.*)$ https://jmeter.apache.org/$1 [L]


Mime
View raw message