From 612001e5706c4e4bbbde5c7f4684d5bebfd82747 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Sat, 13 Apr 2024 06:50:33 +0530 Subject: [PATCH] fix: update default source code config param --- config/default.toml | 2 +- src/proxy.rs | 2 +- templates/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/default.toml b/config/default.toml index 3b9b917..70d3797 100644 --- a/config/default.toml +++ b/config/default.toml @@ -1,5 +1,5 @@ debug = true -source_code = "https://github.com/realaravinth/libmedium" +source_code = "https://git.batsense.net/realaravinth/libmedium" #cache = "/var/lib/libmedium" [server] diff --git a/src/proxy.rs b/src/proxy.rs index c7480e8..310039b 100644 --- a/src/proxy.rs +++ b/src/proxy.rs @@ -133,7 +133,7 @@ const INDEX: &str = include_str!("../templates/index.html"); async fn index() -> impl Responder { HttpResponse::Ok() .content_type("text/html; charset=utf-8") - .body(INDEX) + .body(INDEX.replace("SOURCE_CODE_REPLACE", &crate::SETTINGS.source_code)) } #[actix_web_codegen_const_routes::get(path = "crate::V1_API_ROUTES.proxy.asset")] diff --git a/templates/index.html b/templates/index.html index 3c58c9d..f63268f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -15,7 +15,7 @@ href="/@tylerneely/fear-and-loathing-in-lock-free-programming-7158b1cdd50c" >Demo Article - | Source Code + | Source Code