Skip to content

Commit

Permalink
Optimize the page of redirect for login
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
  • Loading branch information
Jianhui Zhao committed Apr 19, 2018
1 parent c136d24 commit 9a8a58b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,12 @@ static void http_callback_404(struct uh_client *cl)
{
struct config *conf = get_config();
static const char *redirect_html = "<!doctype html>"
"<html><title>Success</title>"
"<html><head><title>Success</title>"
"<script type=\"text/javascript\">"
"setTimeout(function() {location.href = '%s&ip=%s&mac=%s';}, 1);</script>"
"setTimeout(function() {location.replace('%s&ip=%s&mac=%s');}, 1);</script>"
"<style type=\"text/css\">"
"body {color:#FFF}"
"</style></head>"
"<body>Success</body></html>";
const char *remote_addr = cl->get_peer_addr(cl);
const char *host = cl->get_header(cl, "host");
Expand Down

0 comments on commit 9a8a58b

Please sign in to comment.