refactor(security): Change X-Tool-Server-API-Key header to apiKey
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 3m44s

This commit is contained in:
jade
2026-08-18 14:41:12 +09:00
parent b8fd9492c6
commit 91b2b67d85
2 changed files with 5 additions and 1 deletions

View File

@@ -261,6 +261,10 @@ public class ExecuteService {
Map<String, String> headers = new java.util.HashMap<>();
headers.put("trace-id", context.requestId());
headers.put("request-id", java.util.UUID.randomUUID().toString());
String apiKey = properties.toolServerApiKey();
if (apiKey != null && !apiKey.isEmpty()) {
headers.put("apiKey", apiKey);
}
ObjectNode pageArguments = paginationValidator.normalize(metadata, arguments);
LargeToolResponseService.Collector collector = largeResponses.newCollector(metadata.getName(), context.requestId());

View File

@@ -39,7 +39,7 @@ public class ApiKeyInterceptor implements HandlerInterceptor {
return true;
}
String apiKey = request.getHeader("X-Tool-Server-API-Key");
String apiKey = request.getHeader("apiKey");
Map<String, String> validApiKeys = securityProperties.getApiKeys();
// 2. 만약 프로퍼티에 API Key가 하나도 설정되어 있지 않다면 (개발/로컬 환경 등) 인증 없이 통과시킵니다.