ESP8266WebServer server(80);
void handleRoot() {
Serial.print("this request if from=");Serial.println(server.client().remoteIP());
server.send(200, "text/html", "<h1>You are connected to slave node</h1>");
}
if(server.client().localIP() != WiFi. localIP()){ server.send(200, "text/html", "<h1>You are connected to my AP</h1>"); }
server.client().remoteIP()
From RFC6266 section 4.2:
On the other hand, if it matches "inline" (case-insensitively), this implies default processing. Therefore, the disposition type "inline" is only useful when it is augmented with additional parameters, such as the filename (see below).
if(download) {
// set filename and force download
int filenameStart = path.lastIndexOf('/') + 1;
char buf[26+path.length()-filenameStart];
char* filename = (char*)path.c_str() + filenameStart;
snprintf(buf, sizeof (buf), "attachment; filename='%s'", filename);
addHeader("Content-Disposition", buf);
}