git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbf4552
)
r7018: take advantage of the server[TLS_SUPPORT] variable to auto-redirect the home
author
Andrew Tridgell
<tridge@samba.org>
Fri, 27 May 2005 12:36:16 +0000
(12:36 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 18:17:07 +0000
(13:17 -0500)
page of swat to https:// if TLS is initialised OK
swat/index.esp
patch
|
blob
|
history
diff --git
a/swat/index.esp
b/swat/index.esp
index 7023a9e102e7c15e11a664996e8ab2319c3b8e53..037e88836c7c1d1f26cb918dab6758de1842f4dd 100644
(file)
--- 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>