/** * General purpose CGI redirects */ #pragma once #include "httpd-types.h" /** * Use this as a cgi function to redirect one url to another. * * - arg1 is the URL. */ httpd_cgi_state cgiRedirect(HttpdConnData *connData); /** * This CGI function redirects to a fixed url of http://[hostname]/ if hostname field of request isn't * already that hostname. Use this in combination with a DNS server that redirects everything to the * ESP in order to load a HTML page as soon as a phone, tablet etc connects to the ESP. Watch out: * this will also redirect connections when the ESP is in STA mode, potentially to a hostname that is not * in the 'official' DNS and so will fail. * * - arg1 is the new hostname * * @param conn - connection */ httpd_cgi_state cgiRedirectToHostname(HttpdConnData *connData); /** * Used to spit out a 404 error */ httpd_cgi_state cgiNotFound(HttpdConnData *connData);