From ee73b413b17e1f9fc5e23b8dfd0ab82e2107599a Mon Sep 17 00:00:00 2001 From: hhvrc Date: Sun, 29 Sep 2024 17:14:44 +0200 Subject: [PATCH] Prevent unnecessary copies --- src/CaptivePortalInstance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CaptivePortalInstance.cpp b/src/CaptivePortalInstance.cpp index 187c1335..3019ce8e 100644 --- a/src/CaptivePortalInstance.cpp +++ b/src/CaptivePortalInstance.cpp @@ -101,7 +101,7 @@ CaptivePortalInstance::CaptivePortalInstance() m_webServer.serveStatic("/", m_fileSystem, "/www/", "max-age=3600").setDefaultFile("index.html").setSharedEtag(fsHash); // Redirecting connection tests to the captive portal, triggering the "login to network" prompt - m_webServer.onNotFound([softAPURL](AsyncWebServerRequest* request) { request->redirect(softAPURL); }); + m_webServer.onNotFound([&softAPURL](AsyncWebServerRequest* request) { request->redirect(softAPURL); }); } else { OS_LOGE(TAG, "/www/index.html or hash files not found, serving error page");