summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-splash
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-06-16 23:00:57 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-06-16 23:00:57 +0000
commitbe2ae705faab82f3ea4172bfdc5c49a638f277af (patch)
treeca6beb4dbf894e99ae39aca6f7970500ce21ce2b /applications/luci-splash
parentaa3caed0b5ba4218c8665747cdd70b5fbd476d94 (diff)
applications/luci-splash: use an HTML redirect on initial splash, fixes iPhone captive portal detection
Diffstat (limited to 'applications/luci-splash')
-rwxr-xr-xapplications/luci-splash/htdocs/cgi-bin/splash/splash.sh23
1 files changed, 21 insertions, 2 deletions
diff --git a/applications/luci-splash/htdocs/cgi-bin/splash/splash.sh b/applications/luci-splash/htdocs/cgi-bin/splash/splash.sh
index 0abb72373..75e3c2edf 100755
--- a/applications/luci-splash/htdocs/cgi-bin/splash/splash.sh
+++ b/applications/luci-splash/htdocs/cgi-bin/splash/splash.sh
@@ -2,5 +2,24 @@
echo -en "Cache-Control: no-cache, max-age=0, no-store, must-revalidate\r\n"
echo -en "Pragma: no-cache\r\n"
echo -en "Expires: -1\r\n"
-echo -en "Status: 307 Temporary Redirect\r\n"
-echo -en "Location: http://$SERVER_ADDR/cgi-bin/luci/splash\r\n\r\n"
+echo -en "Status: 403 Forbidden\r\n"
+echo -en "Content-Type: text/html\r\n\r\n"
+#echo -en "Status: 307 Temporary Redirect\r\n"
+#echo -en "Location: http://$SERVER_ADDR/cgi-bin/luci/splash\r\n\r\n"
+
+cat <<EOT
+<html>
+ <head>
+ <title>Splash</title>
+ <meta http-equiv="refresh" content="0; url=http://$SERVER_ADDR/cgi-bin/luci/splash" />
+ </head>
+ <body style="font-family:sans-serif">
+ <h1>Splash on $(cat /proc/sys/kernel/hostname)</h1>
+ <p>
+ Redirecting to authentication for $REMOTE_ADDR on $SERVER_ADDR.<br /><br />
+ [<a href="http://$SERVER_ADDR/cgi-bin/luci/splash">Click here to continue...</a>]
+ </p>
+ </body>
+</html>
+EOT
+