turboFei commented on code in PR #2756:
URL: https://github.com/apache/celeborn/pull/2756#discussion_r1769633316
##########
service/src/main/scala/org/apache/celeborn/server/common/http/api/CelebornOpenApiResource.scala:
##########
@@ -81,9 +82,10 @@ class CelebornOpenApiResource extends BaseOpenApiResource
with ApiRequestContext
}
}
- private def setCelebornOpenAPIDefinition(openApi: OpenAPI, requestBaseUrl:
String): OpenAPI = {
- // TODO: to improve when https is enabled.
- val apiUrls = List(requestBaseUrl,
s"http://${httpService.connectionUrl}/").distinct
+ private def setCelebornOpenAPIDefinition(openApi: OpenAPI, requestBaseUri:
URI): OpenAPI = {
+ val httpScheme = if (httpService.httpSslEnabled()) "https:" else "http:"
+ val requestBaseUrl = s"$httpScheme${requestBaseUri.getSchemeSpecificPart}"
+ val apiUrls = List(requestBaseUrl,
s"$httpScheme//${httpService.connectionUrl}/").distinct
Review Comment:
To fix the swagger request url scheme inconsistent when SSL enabled.
<img width="967" alt="image"
src="https://github.com/user-attachments/assets/65e9f87a-a8ad-4621-86dc-58dc96ef9e98">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]