More improvements
This commit is contained in:
parent
e0798b24f7
commit
72653a4ddf
7 changed files with 146 additions and 33 deletions
|
|
@ -289,6 +289,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
let http_client = reqwest::Client::builder()
|
||||
.timeout(Duration::from_secs(SERVICE_CALL_TIMEOUT))
|
||||
.connect_timeout(Duration::from_secs(5))
|
||||
.referer(false)
|
||||
.build()
|
||||
.context("Failed to build HTTP client")?;
|
||||
|
||||
|
|
@ -410,6 +411,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
let state_crawler = state.clone();
|
||||
let state_pb = state.clone();
|
||||
let state_postcode_stats = state.clone();
|
||||
let state_postcode_properties = state.clone();
|
||||
let state_places = state.clone();
|
||||
let state_shorten = state.clone();
|
||||
let state_short_url = state.clone();
|
||||
|
|
@ -473,6 +475,10 @@ async fn main() -> anyhow::Result<()> {
|
|||
"/api/postcode-stats",
|
||||
get(move |ext, query| routes::get_postcode_stats(state_postcode_stats.clone(), ext, query)),
|
||||
)
|
||||
.route(
|
||||
"/api/postcode-properties",
|
||||
get(move |ext, query| routes::get_postcode_properties(state_postcode_properties.clone(), ext, query)),
|
||||
)
|
||||
.route(
|
||||
"/api/screenshot",
|
||||
get(move |headers, query| routes::get_screenshot(state_screenshot.clone(), headers, query)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue