Skip to content

Commit

Permalink
Define public_baseurl for Conduit
Browse files Browse the repository at this point in the history
  • Loading branch information
valkum authored Feb 18, 2021
1 parent ffa9542 commit fe7359a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/SyTest/Homeserver/Conduit.pm
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,21 @@ sub secure_port
sub unsecure_port
{
my $self = shift;
# todo fix
# todo fix secure only mode
return $self->{ports}{rocket_tls};
}

sub public_baseurl
{
my $self = shift;
# run-tests.pl defines whether TLS should be used or not.
my ( $want_tls ) = @_;
# todo fix secure only mode
return $want_tls ?
"https://$self->{bind_host}:" . $self->secure_port() :
"https://$self->{bind_host}:" . $self->unsecure_port();
}

sub print_output
{
my $self = shift;
Expand Down

0 comments on commit fe7359a

Please sign in to comment.