mirror of
https://github.com/derf/travelynx
synced 2024-11-10 15:04:17 +00:00
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:
parent
7c1ccc51b1
commit
a08a4be89e
1 changed files with 6 additions and 1 deletions
|
@ -25,7 +25,12 @@ sub oauth {
|
||||||
my $oa = $self->config->{traewelling}{oauth};
|
my $oa = $self->config->{traewelling}{oauth};
|
||||||
|
|
||||||
return $self->oauth2->get_token_p(
|
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 {
|
sub {
|
||||||
my ($provider) = @_;
|
my ($provider) = @_;
|
||||||
if ( not defined $provider ) {
|
if ( not defined $provider ) {
|
||||||
|
|
Loading…
Reference in a new issue