Skip to content

Commit 6716266

Browse files
fix: use copy instead of reference (#2073)
* fix: use copy instead of reference * fix: exclude swagger --------- Co-authored-by: sangjanai <sang@jan.ai>
1 parent 7194ca6 commit 6716266

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

engine/main.cc

+2-3
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,9 @@ void RunServer(std::optional<std::string> host, std::optional<int> port,
250250
.setClientMaxMemoryBodySize(1024 * 1024); // 1MiB before writing to disk
251251

252252
auto validate_api_key = [config_service](const drogon::HttpRequestPtr& req) {
253-
auto const& api_keys =
254-
config_service->GetApiServerConfiguration()->api_keys;
253+
auto api_keys = config_service->GetApiServerConfiguration()->api_keys;
255254
static const std::unordered_set<std::string> public_endpoints = {
256-
"/healthz", "/processManager/destroy"};
255+
"/openapi.json", "/healthz", "/processManager/destroy"};
257256

258257
// If API key is not set, skip validation
259258
if (api_keys.empty()) {

0 commit comments

Comments
 (0)