From 5d8b8648cb9c478d73fdf5a8dfbd26eabddd542a Mon Sep 17 00:00:00 2001 From: blek Date: Mon, 23 Oct 2023 13:17:40 +1000 Subject: [PATCH] add debug mode notice --- filed/src/web/uploaded.rs | 1 + filed/templates/base.html | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/filed/src/web/uploaded.rs b/filed/src/web/uploaded.rs index 2dcbf30..3d25aa1 100644 --- a/filed/src/web/uploaded.rs +++ b/filed/src/web/uploaded.rs @@ -19,6 +19,7 @@ pub async fn uploaded((file, state): (String, SharedState), authorization: Optio .map_err(|x| warp::reject::custom(HttpReject::StringError(x.to_string())))?; if file_res.is_none() { + log::debug!("Trying to find by name"); file_res = state.file_mgr.find_by_name(file.clone()) .map_err(|x| warp::reject::custom(HttpReject::StringError(x.to_string())))?; } diff --git a/filed/templates/base.html b/filed/templates/base.html index a045fff..761bbb5 100644 --- a/filed/templates/base.html +++ b/filed/templates/base.html @@ -17,6 +17,10 @@ + {%- if cfg!(debug_assertions) -%} + + {%- endif -%} + {%- include "seotags.html" %} {% block head %}{% endblock -%} @@ -36,6 +40,23 @@
+ {%- if cfg!(debug_assertions) -%} +
+

+ Website running in debug mode +

+
+

+ Website is running in development mode that is supposed
+ to be used only for local development purposes. +

+

+ If you see this in a public instance,
+ Please inform the maintainers of the instance of the issue. +

+
+
+ {%- endif -%} {%- block body %}{% endblock -%}