Fixed bug that prevented HTTP to be redirected to SSL (if enabled)

This commit is contained in:
Luca 2017-06-22 16:06:13 -04:00
parent a8d0804143
commit be64fc6865

View file

@ -584,7 +584,7 @@ static int handle_lua_request(struct mg_connection *conn) {
&& isCaptiveURL(request_info->uri)
&& (!strstr(referer, HOTSPOT_DETECT_LUA_URL))
&& (!strstr(referer, CAPTIVE_PORTAL_URL))
&& ((mg_get_header(conn, "Host") == NULL) || (mg_get_header(conn, "Host")[0] == '\0'))
// && ((mg_get_header(conn, "Host") == NULL) || (mg_get_header(conn, "Host")[0] == '\0'))
) {
redirect_to_ssl(conn, request_info);
return(1);