From be2ae705faab82f3ea4172bfdc5c49a638f277af Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 16 Jun 2011 23:00:57 +0000 Subject: [PATCH] applications/luci-splash: use an HTML redirect on initial splash, fixes iPhone captive portal detection --- .../htdocs/cgi-bin/splash/splash.sh | 23 +++++++++++++++++-- 1 file 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 < + + Splash + + + +

Splash on $(cat /proc/sys/kernel/hostname)

+

+ Redirecting to authentication for $REMOTE_ADDR on $SERVER_ADDR.

+ [Click here to continue...] +

+ + +EOT + -- 2.25.1