protect /props endpoint

This commit is contained in:
Xuan Son Nguyen 2024-10-07 23:21:29 +02:00
parent 460ec6f4f6
commit 7560ecb32d

View file

@ -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)