[refactor](http) disable snapshot and get_log_file api (#27724)

Disable 2 http api by default:

1. BE's `/api/snapshot`
2. FE's `/get_log_file`
This commit is contained in:
Mingyu Chen
2023-11-29 16:11:51 +08:00
committed by GitHub
parent c30299cbf7
commit 9daa7dc6b5
5 changed files with 16 additions and 0 deletions

View File

@ -55,6 +55,9 @@ public class GetLogFileAction extends RestBaseController {
@RequestMapping(path = "/api/get_log_file", method = {RequestMethod.GET, RequestMethod.HEAD})
public Object execute(HttpServletRequest request, HttpServletResponse response) {
if (!Config.enable_get_log_file_api) {
return ResponseEntityBuilder.badRequest("feature disabled");
}
executeCheckPassword(request, response);
checkGlobalAuth(ConnectContext.get().getCurrentUserIdentity(), PrivPredicate.ADMIN);