void buildFromCurrentContextPath(SwaggerUiConfigParameters swaggerUiConfigParameters, ServerHttpRequest request) {
		super.init(swaggerUiConfigParameters);
		swaggerUiConfigParameters.setContextPath(request.getPath().contextPath().value());
		String url = UriComponentsBuilder.fromHttpRequest(request).toUriString();
		String target = UriComponentsBuilder.fromPath(request.getPath().contextPath().value()).toUriString();
		int endIndex = url.indexOf(target) + target.length();
		if (endIndex > 0) {
			url = url.substring(0, endIndex);
		}
		else {
			url = url.replace(request.getPath().toString(), "");
		}
		buildConfigUrl(swaggerUiConfigParameters, UriComponentsBuilder.fromUriString(url));
	}
From current context path string.

@param swaggerUiConfigParameters the swagger ui config parameters
@param request                   the request
@return the string
springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeCommon.java