Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server : better security control for public deployments #9776

Merged
merged 6 commits into from
Oct 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
protect /props endpoint
  • Loading branch information
ngxson committed Oct 7, 2024
commit 7560ecb32d6f777efda0abb804163563e6b32b33
3 changes: 1 addition & 2 deletions examples/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2525,7 +2525,6 @@ int main(int argc, char ** argv) {
"/health",
"/models",
"/v1/models",
"/props",
};

// If API key is not set, skip validation
Expand Down Expand Up @@ -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)
Expand Down
Loading