✂️ Removes cors preflight from sleep service
This commit is contained in:
@@ -24,18 +24,6 @@ SleepService::SleepService(PsychicHttpServer *server,
|
||||
|
||||
void SleepService::begin()
|
||||
{
|
||||
// OPTIONS (for CORS preflight)
|
||||
#ifdef ENABLE_CORS
|
||||
_server->on(SLEEP_SERVICE_PATH,
|
||||
HTTP_OPTIONS,
|
||||
_securityManager->wrapRequest(
|
||||
[this](PsychicRequest *request)
|
||||
{
|
||||
return request->reply(200);
|
||||
},
|
||||
AuthenticationPredicates::IS_AUTHENTICATED));
|
||||
#endif
|
||||
|
||||
_server->on(SLEEP_SERVICE_PATH,
|
||||
HTTP_POST,
|
||||
_securityManager->wrapRequest(std::bind(&SleepService::sleep, this, std::placeholders::_1),
|
||||
|
||||
Reference in New Issue
Block a user