Set user agent for bahn.expoert api requests

This commit is contained in:
clerie 2024-07-27 22:14:29 +02:00
parent 26ea045216
commit e0a350725e

View File

@ -198,6 +198,7 @@ async fn route_station_to_dest_station(
let client = reqwest::Client::new();
let stationdata_req = client.get(format!("https://bahn.expert/api/iris/v2/abfahrten/{}?lookahead=150&lookbehind=10", station_properties.code))
.header(reqwest::header::USER_AGENT, "https://nurausstieg.clerie.de - abuse: nurausstieg@clerie.de")
.send().await
.map_err(|_err| (StatusCode::INTERNAL_SERVER_ERROR, String::from("Station Data cannot be fetched")))?;