some minor formatting

This commit is contained in:
proddy
2021-05-02 22:07:22 +02:00
parent 7d0ed2246a
commit 23218bca7d
7 changed files with 52 additions and 28 deletions

View File

@@ -14,7 +14,7 @@ AuthenticationService::AuthenticationService(AsyncWebServer * server, SecurityMa
}
/**
* Verifys that the request supplied a valid JWT.
* Verifies that the request supplied a valid JWT.
*/
void AuthenticationService::verifyAuthorization(AsyncWebServerRequest * request) {
Authentication authentication = _securityManager->authenticateRequest(request);

View File

@@ -40,6 +40,11 @@ ESP8266React::ESP8266React(AsyncWebServer * server, FS * fs)
});
}
});
// only added for local testing (CORS)
// DefaultHeaders::Instance().addHeader("Access-Control-Allow-Headers", "Accept, Content-Type, Authorization");
// DefaultHeaders::Instance().addHeader("Access-Control-Allow-Credentials", "true");
// DefaultHeaders::Instance().addHeader("Access-Control-Allow-Origin", "*");
}
void ESP8266React::begin() {

View File

@@ -5,7 +5,7 @@
#include <WiFi.h>
#include <ArduinoJson.h>
#include <AsyncJson.h> // TODO needed for AsyncJsonResponse
#include <AsyncJson.h>
#include <ESPAsyncWebServer.h>
#define MAX_FEATURES_SIZE 256

View File

@@ -5,7 +5,7 @@
#include <ArduinoJsonJWT.h>
#include <ESPAsyncWebServer.h>
#include <ESPUtils.h>
#include <AsyncJson.h> // TODO neede for AsyncJsonResponse
#include <AsyncJson.h>
#include <list>
#ifndef FACTORY_JWT_SECRET