From 7560ecb32d6f777efda0abb804163563e6b32b33 Mon Sep 17 00:00:00 2001 From: Xuan Son Nguyen Date: Mon, 7 Oct 2024 23:21:29 +0200 Subject: [PATCH] protect /props endpoint --- examples/server/server.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index a5c38970a..1ae3a9fec 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -2525,7 +2525,6 @@ int main(int argc, char ** argv) { "/health", "/models", "/v1/models", - "/props", }; // If API key is not set, skip validation @@ -3277,7 +3276,7 @@ int main(int argc, char ** argv) { // register API routes svr->Get ("/health", handle_health); // public endpoint (no API key check) svr->Get ("/metrics", handle_metrics); - svr->Get ("/props", handle_props); // public endpoint (no API key check) + svr->Get ("/props", handle_props); svr->Post("/props", handle_props_change); svr->Get ("/models", handle_models); // public endpoint (no API key check) svr->Get ("/v1/models", handle_models); // public endpoint (no API key check)