summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <dfriesel@uos.de>2023-08-08 18:15:31 +0200
committerBirte Kristina Friesel <dfriesel@uos.de>2023-08-08 18:15:31 +0200
commita08a4be89ecab9fe40d1711f7994f8fa40a8e2f0 (patch)
tree0c6141e6bb6e171274736d9be147cccd2c7a3155
parent7c1ccc51b1472852ea67f4793435097a42d30587 (diff)
Fix Traewelling OAuth2 behind reverse proxies1.34.1
a reverse proxy makes mojolicious believe that it is using HTTP, even though it is HTTPS.
-rw-r--r--lib/Travelynx/Controller/Traewelling.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Travelynx/Controller/Traewelling.pm b/lib/Travelynx/Controller/Traewelling.pm
index e14872d..f1f24e7 100644
--- a/lib/Travelynx/Controller/Traewelling.pm
+++ b/lib/Travelynx/Controller/Traewelling.pm
@@ -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 ) {