diff --git a/src/endpoints_handlers/UserGetMedicationsExecutor.h b/src/endpoints_handlers/UserGetMedicationsExecutor.h index 8a263b2..152b5bd 100644 --- a/src/endpoints_handlers/UserGetMedicationsExecutor.h +++ b/src/endpoints_handlers/UserGetMedicationsExecutor.h @@ -44,7 +44,7 @@ public: BOOST_LOG_TRIVIAL(info) << "GET /api/v1/User/Medications - Request"; - if (req[http::field::authorization].empty()) + if (req[http::field::authorization].size() <= auth_prefix.size()) { BOOST_LOG_TRIVIAL(info) << invalid_token_message; throw session_exception(http::status::unauthorized, "Unauthorized");