We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0eb5c70 commit f828876Copy full SHA for f828876
libraries/WebServer/examples/Filters/Filters.ino
@@ -19,12 +19,12 @@ const int led = LED_BUILTIN;
19
20
// ON_STA_FILTER - Only accept requests coming from STA interface
21
bool ON_STA_FILTER(WebServer &server) {
22
- return WiFi.STA.hasIP() && WiFi.STA.localIP() == server.client().localIP();
+ return WiFi.STA.localIP() == server.client().localIP();
23
}
24
25
// ON_AP_FILTER - Only accept requests coming from AP interface
26
bool ON_AP_FILTER(WebServer &server) {
27
- return WiFi.AP.hasIP() && WiFi.AP.localIP() == server.client().localIP();
+ return WiFi.AP.softAPIP() == server.client().localIP();
28
29
30
void handleNotFound() {
0 commit comments