Introduce an environment variable to disable HTTPS, and use it when fetching WebFinger resources

You can now use USE_HTTPS=0 when debugging the federation locally.
This commit is contained in:
Bat
2018-06-26 16:16:59 +02:00
parent 5bbfd9d1e9
commit f805ec1d53
6 changed files with 19 additions and 14 deletions
+2
View File
@@ -88,6 +88,8 @@ lazy_static! {
pub static ref DB_URL: String = env::var("DB_URL")
.unwrap_or(format!("postgres://plume:plume@localhost/{}", env::var("DB_NAME").unwrap_or(String::from("plume"))));
pub static ref USE_HTTPS: bool = env::var("USE_HTTPS").map(|val| val == "1").unwrap_or(true);
}
pub mod blog_authors;