diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-04-16 19:49:10 +0200 | 
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-04-16 19:49:10 +0200 | 
| commit | 7b4a411c128a82ef562bcbcccd773d16c56ab147 (patch) | |
| tree | aeaf52515f04b24e97a13d88e8ea1b77c0244832 /lib | |
| parent | f830f5d4f514c72b6e4b5a9d5237ce8657ab0914 (diff) | |
DBRIS: Use optional proxy for map (journey) requests4.36.6
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/DBInfoscreen/Helper/DBRIS.pm | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/lib/DBInfoscreen/Helper/DBRIS.pm b/lib/DBInfoscreen/Helper/DBRIS.pm index 39d1cb0..17f0084 100644 --- a/lib/DBInfoscreen/Helper/DBRIS.pm +++ b/lib/DBInfoscreen/Helper/DBRIS.pm @@ -13,6 +13,7 @@ use Encode qw(decode encode);  use Travel::Status::DE::DBRIS;  use Mojo::JSON qw(decode_json);  use Mojo::Promise; +use Mojo::UserAgent;  sub new {  	my ( $class, %opt ) = @_; @@ -38,6 +39,13 @@ sub get_polyline_p {  	my $agent = $self->{user_agent}; +	if ( my $proxy = $ENV{DBFAKEDISPLAY_DBRIS_PROXY} ) { +		say "set up proxy $proxy"; +		$agent = Mojo::UserAgent->new; +		$agent->proxy->http($proxy); +		$agent->proxy->https($proxy); +	} +  	Travel::Status::DE::DBRIS->new_p(  		journey       => $trip_id,  		with_polyline => 1, | 
