Skip to content

Commit

Permalink
Merge pull request #19 from naver/feature/fix-collector-url-of-grpc
Browse files Browse the repository at this point in the history
Fix collector url of grpc

Reviewed-by: @junoyoon @kojandy
  • Loading branch information
taeyeon-Kim authored Feb 27, 2023
2 parents ccbd8a7 + 4457e16 commit 0228dc8
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ class AgentController(
@GetMapping(V5_INIT_CONFIG, produces = [MediaType.APPLICATION_JSON_VALUE])
fun grpcInitConfig(@RequestParam licenseKey: String, request: HttpServletRequest): InitConfigResponse {
logger.info { "init config requested from grpc client ${request.remoteAddr} with licenseKey: $licenseKey" }
val splitUrl = request.requestURL.split("/")
val collectorUrl = "${splitUrl[0]}//${splitUrl[2]}"
return InitConfigResponse.newBuilder()
.setCollectorUrl(collectorUrl)
.setCollectorUrl(request.requestURL.split("/")[2])
.build()
}

Expand Down

0 comments on commit 0228dc8

Please sign in to comment.