mirror of
https://github.com/modrinth/code.git
synced 2026-08-26 09:34:50 +00:00
Make mrpack downloads HTTPS-only (#5882)
* Add set of trusted download hosts for mrpacks * split secure/insecure reqwest client * make fetching https-only * lint fix
This commit is contained in:
@@ -4,11 +4,11 @@ use reqwest::StatusCode;
|
||||
|
||||
use crate::State;
|
||||
use crate::state::{Credentials, MinecraftLoginFlow};
|
||||
use crate::util::fetch::REQWEST_CLIENT;
|
||||
use crate::util::fetch::INSECURE_REQWEST_CLIENT;
|
||||
|
||||
#[tracing::instrument]
|
||||
pub async fn check_reachable() -> crate::Result<()> {
|
||||
let resp = REQWEST_CLIENT
|
||||
let resp = INSECURE_REQWEST_CLIENT
|
||||
.get("https://sessionserver.mojang.com/session/minecraft/hasJoined")
|
||||
.send()
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user