From 3af70b4953a6265c79a2dd99cb6b0a607bc0eb85 Mon Sep 17 00:00:00 2001 From: Debashish Sahu Date: Tue, 5 Mar 2019 11:52:52 -0500 Subject: [PATCH] Update McLighting.ino - "/pixelconf" code to check for HTTP method code is commented but placed for the future --- Arduino/McLighting/McLighting.ino | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Arduino/McLighting/McLighting.ino b/Arduino/McLighting/McLighting.ino index 98efe7b..09b19ef 100644 --- a/Arduino/McLighting/McLighting.ino +++ b/Arduino/McLighting/McLighting.ino @@ -773,6 +773,19 @@ void setup() { server.on("/pixelconf", []() { + /* + + // This will be used later when web-interface is ready and HTTP_GET will not be allowed to update the Strip Settings + + if(server.args() == 0 and server.method() != HTTP_POST) + { + server.sendHeader("Access-Control-Allow-Origin", "*"); + server.send(200, "text/plain", "Only HTTP POST method is allowed and check the number of arguments!"); + return; + } + + */ + bool updateStrip = false; if(server.hasArg("ct")){ uint16_t pixelCt = server.arg("ct").toInt();