✂️ Removes cors preflight from sleep service

This commit is contained in:
Rune Harlyk
2024-05-24 20:41:19 +02:00
committed by Rune Harlyk
parent dec60bc7d1
commit d17c30c314
@@ -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),