From 17aa13951095cd5a7f0528e8408126f8979a62ff Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Tue, 3 Nov 2020 10:26:51 -0500 Subject: [PATCH] botinfo route --- backend/src/lib.rs | 7 ++++++- backend/src/main.rs | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/backend/src/lib.rs b/backend/src/lib.rs index ccf66cc..c2a06a1 100644 --- a/backend/src/lib.rs +++ b/backend/src/lib.rs @@ -11,7 +11,12 @@ extern crate tracing; use diesel::sqlite::SqliteConnection; -pub const APPLICATION_NAME: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION")); +pub const APPLICATION_NAME: &str = concat!( + env!("CARGO_PKG_NAME"), + "/", + env!("CARGO_PKG_VERSION"), + " +https://mi.within.website/.within/botinfo" +); pub mod api; pub mod models; diff --git a/backend/src/main.rs b/backend/src/main.rs index b0d25d3..dd3db2e 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -11,6 +11,25 @@ use rocket_prometheus::PrometheusMetrics; use ::mi::{api, web, MainDatabase, APPLICATION_NAME}; +#[get("/.within/botinfo")] +fn botinfo() -> &'static str { + r#"Hello, if you are reading this, you have found this URL in your +access logs. If this program is doing something you don't want it to do, +please contact me at me@christine.website. + +This service is intended to act as a POSSE[1] syndication server for +various services to various other services. + +Every effort is being taken to ensure that the data going through this +server is my own. + +I'm sorry if this causes you any inconvenience. + +[1]: https://indieweb.org/POSSE + +Be well, Creator."# +} + fn main() -> Result<()> { let _ = kankyo::init(); color_eyre::install()?; @@ -29,6 +48,7 @@ fn main() -> Result<()> { .mount( "/", routes![ + botinfo, api::get_members, api::get_switches, api::get_switch,