Skip to content

Commit

Permalink
fix: filters example #2
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushsharma82 committed Jun 13, 2024
1 parent f828876 commit f1a2b07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/WebServer/examples/Filters/Filters.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ const int led = LED_BUILTIN;

// ON_STA_FILTER - Only accept requests coming from STA interface
bool ON_STA_FILTER(WebServer &server) {
return WiFi.STA.localIP() == server.client().localIP();
return WiFi.localIP() == server.client().localIP();
}

// ON_AP_FILTER - Only accept requests coming from AP interface
bool ON_AP_FILTER(WebServer &server) {
return WiFi.AP.softAPIP() == server.client().localIP();
return WiFi.softAPIP() == server.client().localIP();
}

void handleNotFound() {
Expand Down

0 comments on commit f1a2b07

Please sign in to comment.