Skip to content

Commit

Permalink
Slash is added to the end of telemetry uri if not presented
Browse files Browse the repository at this point in the history
  • Loading branch information
ErakhtinB committed Nov 27, 2024
1 parent 5b72106 commit 86777eb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/telemetry/impl/connection_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ namespace kagome::telemetry {
auto &path = endpoint_.uri().Path;
path_ = path.empty() ? "/" : path;

// https://github.com/qdrvm/kagome/discussions/2265#discussioncomment-11245398
if (path_.back() != '/') {
path_ += '/';
}

if (secure_) {
if (not ssl_ctx_) {
ssl_ctx_.emplace(endpoint_.uri().Host);
Expand Down Expand Up @@ -153,9 +158,9 @@ namespace kagome::telemetry {
boost::beast::lowest_layer_type<TelemetryConnectionImpl::SslStream> &
TelemetryConnectionImpl::stream_lowest_layer() {
return secure_ ? boost::beast::get_lowest_layer(
*boost::relaxed_get<WsSslStreamPtr>(ws_))
*boost::relaxed_get<WsSslStreamPtr>(ws_))
: boost::beast::get_lowest_layer(
*boost::relaxed_get<WsTcpStreamPtr>(ws_));
*boost::relaxed_get<WsTcpStreamPtr>(ws_));
}

template <typename WsStreamT>
Expand Down

0 comments on commit 86777eb

Please sign in to comment.