From 590f56d564d8bcaa9ff1c4bcdbcbb0d3b5c9f7f1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 27 May 2005 12:36:16 +0000 Subject: 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) --- swat/index.esp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'swat/index.esp') 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 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"); +} %> -- cgit