summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 8ea0114..6714e0b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,4 +1,5 @@
use std::{env, error::Error, collections::HashMap, process::exit, sync::Arc};
+use reqwest::ClientBuilder;
use serde::Deserialize;
use axum::{Router, Extension};
use tera::Tera;
@@ -19,8 +20,13 @@ pub struct Page {
async fn load_state() -> Result<State, Box<dyn Error>> {
let mut templates = Tera::new("public/templates/**")?;
templates.autoescape_on(vec![]);
-
- let json = reqwest::get("https://raw.githubusercontent.com/bucketfish/bucket-webring/master/webring.json")
+
+ let client = ClientBuilder::new()
+ .use_rustls_tls()
+ .build()?;
+
+ let json = client.get("https://raw.githubusercontent.com/bucketfish/bucket-webring/master/webring.json")
+ .send()
.await?
.json::<Vec<Page>>()
.await?;