summaryrefslogtreecommitdiff
path: root/swat/index.esp
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-05-27 12:36:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:07 -0500
commit590f56d564d8bcaa9ff1c4bcdbcbb0d3b5c9f7f1 (patch)
tree535019c096f874a8b590b06ea87243b722e946c5 /swat/index.esp
parent67a38fc159a137134b9be0703d25ab32abddd564 (diff)
downloadsamba-590f56d564d8bcaa9ff1c4bcdbcbb0d3b5c9f7f1.tar.gz
samba-590f56d564d8bcaa9ff1c4bcdbcbb0d3b5c9f7f1.tar.bz2
samba-590f56d564d8bcaa9ff1c4bcdbcbb0d3b5c9f7f1.zip
r7018: take advantage of the server[TLS_SUPPORT] variable to auto-redirect the home
page of swat to https:// if TLS is initialised OK (This used to be commit 519bdcac966755b18990ec5382838b2130394daf)
Diffstat (limited to 'swat/index.esp')
-rw-r--r--swat/index.esp7
1 files changed, 6 insertions, 1 deletions
diff --git a/swat/index.esp b/swat/index.esp
index 7023a9e102..037e88836c 100644
--- a/swat/index.esp
+++ b/swat/index.esp
@@ -5,7 +5,12 @@ Samba4 ESP test
<BODY>
redirecting you to the test pages ...
<%
- redirect("esptest/index.esp");
+if (server['SERVER_PROTOCOL'] == "http" &&
+ server['TLS_SUPPORT'] == "True") {
+ redirect("https://" + headers['HOST'] + request['REQUEST_URI']);
+} else {
+ redirect("esptest/index.esp");
+}
%>
</BODY>
</HTML>