diff options
author | Vika Shleina <vika@fireburn.ru> | 2021-07-21 06:25:15 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2021-07-27 01:47:59 +0300 |
commit | 758fe3ef8baa68e71f766ae5499dfa6988d0d72a (patch) | |
tree | 51905753c1abcf8ddde28601ea2d3dbd92607f5e /src/main.rs | |
parent | c98e370326102dac0c7c16c9b556da018b41803b (diff) | |
download | kittybox-758fe3ef8baa68e71f766ae5499dfa6988d0d72a.tar.zst |
Added an internal token mechanism
The internal token is a shared secret that can update and delete any posts stored in the database. It is intended for use in webmention endpoints to update posts with latest webmentions. Please keep it safe.
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 2f7152f..eb7b538 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,6 +58,8 @@ async fn main() -> Result<(), std::io::Error> { let media_endpoint: Option<String> = env::var("MEDIA_ENDPOINT").ok(); + let internal_token: Option<String> = env::var("KITTYBOX_INTERNAL_TOKEN").ok(); + let host = env::var("SERVE_AT") .ok() .unwrap_or_else(|| "0.0.0.0:8080".to_string()); @@ -66,6 +68,7 @@ async fn main() -> Result<(), std::io::Error> { authorization_endpoint, redis_uri, media_endpoint, + internal_token ) .await; app.listen(host).await |