MCPcopy Create free account
hub / github.com/bdring/FluidNC / handle_root

Method handle_root

FluidNC/src/WebUI/WebUIServer.cpp:438–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436 }
437
438 void WebUI_Server::handle_root(AsyncWebServerRequest* request) {
439 log_info("WebUI: Request from " << request->client()->remoteIP());
440 if (!(request->hasParam("forcefallback") && request->getParam("forcefallback")->value() == "yes")) {
441 if (myStreamFile(request, "index.html", false, true)) {
442 return;
443 }
444 }
445
446 // If we did not send index.html, send the default content that provides simple localfs file management
447 AsyncWebServerResponse* response = request->beginResponse(200, "text/html", (const uint8_t*)PAGE_NOFILES, PAGE_NOFILES_SIZE);
448 response->addHeader("Content-Encoding", "gzip");
449 request->send(response);
450 }
451
452 // Handle filenames and other things that are not explicitly registered
453 void WebUI_Server::handle_not_found(AsyncWebServerRequest* request) {

Callers

nothing calls this directly

Calls 2

remoteIPMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected