Skip to content

Commit 0228dc8

Browse files
authored
Merge pull request #19 from naver/feature/fix-collector-url-of-grpc
Fix collector url of grpc Reviewed-by: @junoyoon @kojandy
2 parents ccbd8a7 + 4457e16 commit 0228dc8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

scavenger-collector/src/main/kotlin/com/navercorp/scavenger/controller/AgentController.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ class AgentController(
4141
@GetMapping(V5_INIT_CONFIG, produces = [MediaType.APPLICATION_JSON_VALUE])
4242
fun grpcInitConfig(@RequestParam licenseKey: String, request: HttpServletRequest): InitConfigResponse {
4343
logger.info { "init config requested from grpc client ${request.remoteAddr} with licenseKey: $licenseKey" }
44-
val splitUrl = request.requestURL.split("/")
45-
val collectorUrl = "${splitUrl[0]}//${splitUrl[2]}"
4644
return InitConfigResponse.newBuilder()
47-
.setCollectorUrl(collectorUrl)
45+
.setCollectorUrl(request.requestURL.split("/")[2])
4846
.build()
4947
}
5048

0 commit comments

Comments
 (0)