Fix Traewelling OAuth2 behind reverse proxies

a reverse proxy makes mojolicious believe that it is using HTTP, even though
it is HTTPS.
This commit is contained in:
Birte Kristina Friesel 2023-08-08 18:15:31 +02:00
parent 7c1ccc51b1
commit a08a4be89e
No known key found for this signature in database
GPG key ID: B63118F7196EA660

View file

@ -25,7 +25,12 @@ sub oauth {
my $oa = $self->config->{traewelling}{oauth};
return $self->oauth2->get_token_p(
traewelling => { scope => 'read-statuses write-statuses' } )->then(
traewelling => {
redirect_uri => $self->base_url_for('/oauth/traewelling')
->to_abs->scheme('https')->to_string,
scope => 'read-statuses write-statuses'
}
)->then(
sub {
my ($provider) = @_;
if ( not defined $provider ) {