Unverified Commit a08a4be8 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Fix Traewelling OAuth2 behind reverse proxies

a reverse proxy makes mojolicious believe that it is using HTTP, even though
it is HTTPS.
parent 7c1ccc51
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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 ) {