Browse Source

Check WS auth only on start event

fastled
Xose Pérez 7 years ago
parent
commit
5d0268769e
3 changed files with 3001 additions and 3000 deletions
  1. BIN
      code/espurna/data/index.html.gz
  2. +2995
    -2995
      code/espurna/static/index.html.gz.h
  3. +6
    -5
      code/espurna/web.ino

BIN
code/espurna/data/index.html.gz View File


+ 2995
- 2995
code/espurna/static/index.html.gz.h
File diff suppressed because it is too large
View File


+ 6
- 5
code/espurna/web.ino View File

@ -743,12 +743,13 @@ bool _wsAuth(AsyncWebSocketClient * client) {
void _wsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventType type, void * arg, uint8_t *data, size_t len){
// Authorize
#ifndef NOWSAUTH
if (!_wsAuth(client)) return;
#endif
if (type == WS_EVT_CONNECT) {
// Authorize
#ifndef NOWSAUTH
if (!_wsAuth(client)) return;
#endif
IPAddress ip = client->remoteIP();
DEBUG_MSG_P(PSTR("[WEBSOCKET] #%u connected, ip: %d.%d.%d.%d, url: %s\n"), client->id(), ip[0], ip[1], ip[2], ip[3], server->url());
_wsStart(client->id());


Loading…
Cancel
Save