|
|
@ -119,39 +119,39 @@ general ones. Authorization things (like authBasic) act as a 'barrier' and |
|
|
|
should be placed above the URLs they protect. |
|
|
|
should be placed above the URLs they protect. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
HttpdBuiltInUrl builtInUrls[]={ |
|
|
|
HttpdBuiltInUrl builtInUrls[]={ |
|
|
|
{"*", cgiRedirectApClientToHostname, "esp8266.nonet"}, |
|
|
|
ROUTE_CGI_ARG("*", cgiRedirectApClientToHostname, "esp8266.nonet"), // redirect func for the captive portal
|
|
|
|
{"/", cgiRedirect, "/index.tpl"}, |
|
|
|
ROUTE_REDIRECT("/", "/index.tpl"), |
|
|
|
{"/led.tpl", cgiEspFsTemplate, tplLed}, |
|
|
|
ROUTE_TPL("/led.tpl", tplLed), |
|
|
|
{"/index.tpl", cgiEspFsTemplate, tplCounter}, |
|
|
|
ROUTE_TPL("/index.tpl", tplCounter), |
|
|
|
{"/led.cgi", cgiLed, NULL}, |
|
|
|
ROUTE_CGI("/led.cgi", cgiLed), |
|
|
|
#ifdef INCLUDE_FLASH_FNS |
|
|
|
#ifdef INCLUDE_FLASH_FNS |
|
|
|
{"/flash/next", cgiGetFirmwareNext, &uploadParams}, |
|
|
|
ROUTE_CGI_ARG("/flash/next", cgiGetFirmwareNext, &uploadParams), |
|
|
|
{"/flash/upload", cgiUploadFirmware, &uploadParams}, |
|
|
|
ROUTE_CGI_ARG("/flash/upload", cgiUploadFirmware, &uploadParams), |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
{"/flash/reboot", cgiRebootFirmware, NULL}, |
|
|
|
ROUTE_CGI("/flash/reboot", cgiRebootFirmware), |
|
|
|
|
|
|
|
|
|
|
|
//Routines to make the /wifi URL and everything beneath it work.
|
|
|
|
//Routines to make the /wifi URL and everything beneath it work.
|
|
|
|
|
|
|
|
|
|
|
|
//Enable the line below to protect the WiFi configuration with an username/password combo.
|
|
|
|
//Enable the line below to protect the WiFi configuration with an username/password combo.
|
|
|
|
// {"/wifi/*", authBasic, myPassFn},
|
|
|
|
// ROUTE_AUTH("/wifi/*", myPassFn),
|
|
|
|
|
|
|
|
|
|
|
|
{"/wifi", cgiRedirect, "/wifi/wifi.tpl"}, |
|
|
|
ROUTE_REDIRECT("/wifi", "/wifi/wifi.tpl"), |
|
|
|
{"/wifi/", cgiRedirect, "/wifi/wifi.tpl"}, |
|
|
|
ROUTE_REDIRECT("/wifi/", "/wifi/wifi.tpl"), |
|
|
|
{"/wifi/wifiscan.cgi", cgiWiFiScan, NULL}, |
|
|
|
ROUTE_CGI("/wifi/wifiscan.cgi", cgiWiFiScan), |
|
|
|
{"/wifi/wifi.tpl", cgiEspFsTemplate, tplWlan}, |
|
|
|
ROUTE_TPL("/wifi/wifi.tpl", tplWlan), |
|
|
|
{"/wifi/connect.cgi", cgiWiFiConnect, NULL}, |
|
|
|
ROUTE_CGI("/wifi/connect.cgi", cgiWiFiConnect), |
|
|
|
{"/wifi/connstatus.cgi", cgiWiFiConnStatus, NULL}, |
|
|
|
ROUTE_CGI("/wifi/connstatus.cgi", cgiWiFiConnStatus), |
|
|
|
{"/wifi/setmode.cgi", cgiWiFiSetMode, NULL}, |
|
|
|
ROUTE_CGI("/wifi/setmode.cgi", cgiWiFiSetMode), |
|
|
|
|
|
|
|
|
|
|
|
{"/websocket/ws.cgi", cgiWebsocket, myWebsocketConnect}, |
|
|
|
ROUTE_WS("/websocket/ws.cgi", myWebsocketConnect), |
|
|
|
{"/websocket/echo.cgi", cgiWebsocket, myEchoWebsocketConnect}, |
|
|
|
ROUTE_WS("/websocket/echo.cgi", myEchoWebsocketConnect), |
|
|
|
|
|
|
|
|
|
|
|
{"/test", cgiRedirect, "/test/index.html"}, |
|
|
|
ROUTE_REDIRECT("/test", "/test/index.html"), |
|
|
|
{"/test/", cgiRedirect, "/test/index.html"}, |
|
|
|
ROUTE_REDIRECT("/test/", "/test/index.html"), |
|
|
|
{"/test/test.cgi", cgiTestbed, NULL}, |
|
|
|
ROUTE_CGI("/test/test.cgi", cgiTestbed), |
|
|
|
|
|
|
|
|
|
|
|
{"*", cgiEspFsHook, NULL}, //Catch-all cgi function for the filesystem
|
|
|
|
ROUTE_FILESYSTEM(), |
|
|
|
{NULL, NULL, NULL} |
|
|
|
ROUTE_END(), |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|