summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTyler Murphy <tylerm@tylerm.dev>2023-07-08 23:47:26 -0400
committerTyler Murphy <tylerm@tylerm.dev>2023-07-08 23:47:26 -0400
commit9f21971f76a52dfbfdc06400e8708456e0b51f94 (patch)
treefce7761d271570376a11bcb813b6dfcae605a07d /src
parentbucket (diff)
downloadbucket-9f21971f76a52dfbfdc06400e8708456e0b51f94.tar.gz
bucket-9f21971f76a52dfbfdc06400e8708456e0b51f94.tar.bz2
bucket-9f21971f76a52dfbfdc06400e8708456e0b51f94.zip
alpine docker went boomed
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?;