mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
CaptivePortalAdvanced: Change debug print to println
This commit is contained in:
parent
319adc6b8a
commit
f77645465c
@ -53,7 +53,7 @@ void setup() {
|
||||
delay(1000);
|
||||
Serial.begin(9600);
|
||||
Serial.println();
|
||||
Serial.print("Configuring access point...");
|
||||
Serial.println("Configuring access point...");
|
||||
/* You can remove the password parameter if you want the AP to be open. */
|
||||
WiFi.softAPConfig(apIP, apIP, netMsk);
|
||||
WiFi.softAP(softAP_ssid, softAP_password);
|
||||
|
@ -27,7 +27,7 @@ void handleRoot() {
|
||||
/** Redirect to captive portal if we got a request for another domain. Return true in that case so the page handler do not try to handle the request again. */
|
||||
boolean captivePortal() {
|
||||
if (!isIp(server.hostHeader()) && server.hostHeader() != (String(myHostname) + ".local")) {
|
||||
Serial.print("Request redirected to captive portal");
|
||||
Serial.println("Request redirected to captive portal");
|
||||
server.sendHeader("Location", String("http://") + toStringIp(server.client().localIP()), true);
|
||||
server.send(302, "text/plain", ""); // Empty content inhibits Content-length header so we have to close the socket ourselves.
|
||||
server.client().stop(); // Stop is needed because we sent no content length
|
||||
|
Loading…
x
Reference in New Issue
Block a user