diff options
author | Timo Kösters <timo@koesters.xyz> | 2023-08-09 18:27:30 +0200 |
---|---|---|
committer | Timo Kösters <timo@koesters.xyz> | 2023-08-09 18:27:30 +0200 |
commit | c028e0553c541d954b50f82f8ea058c43d8b7d22 (patch) | |
tree | fee8f67c02c320cb47835cdbf7828900a4a2247b /src/database | |
parent | 3e518773e20849bb712c7942fcc2d0a5147f7868 (diff) | |
download | conduit-c028e0553c541d954b50f82f8ea058c43d8b7d22.zip |
feat: registration tokens
Diffstat (limited to 'src/database')
-rw-r--r-- | src/database/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/database/mod.rs b/src/database/mod.rs index b36347d..e247d9f 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -267,6 +267,10 @@ impl KeyValueDatabase { } }; + if config.registration_token == Some(String::new()) { + return Err(Error::bad_config("Registration token is empty")); + } + if config.max_request_size < 1024 { error!(?config.max_request_size, "Max request size is less than 1KB. Please increase it."); } |