Skip to content

Commit f1a2b07

Browse files
committed
fix: filters example #2
1 parent f828876 commit f1a2b07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/WebServer/examples/Filters/Filters.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ const int led = LED_BUILTIN;
1919

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

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

3030
void handleNotFound() {

0 commit comments

Comments
 (0)