Skip to content

Commit

Permalink
fix message when no uploader_key is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
auguwu committed Feb 22, 2024
1 parent ae46c9a commit 7065f51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/cli/cmds/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,6 @@ fn panic_handler(message: Box<dyn Any + Send + 'static>) -> Response<Body> {

fn print_banner() {
let mut stdout = io::stdout().lock();

let _ = writeln!(stdout);
let _ = writeln!(
stdout,
"» Booting up {} v{}, compiled with Rust v{}",
Expand Down
7 changes: 4 additions & 3 deletions src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,10 @@ impl Config {
cfg.merge(file);
if cfg.uploader_key.is_empty() {
let key = __generated_uploader_key();
eprintln!("[ume WARN] Missing a uploader key for encoding JWT tokens, but I have generated one for you: {key}\n
Set this in the `UME_UPLOADER_KEY` environment variable when loading the server or in the `uploader_key` in your `config.hcl` file.\n
If any other key replaces this, then all JWT tokens will no longer be able to be verified, so it is recommended to keep this safe somewhere");
eprintln!("[ume WARN] Missing a uploader key for authentication! I have generated one for you:\n
\t\t{key}\n
Set this in the `UME_UPLOADER_KEY` environment variable when loading the server or in the `uploader_key` in your `config.hcl` file.
If any other key replaces this, then it'll no longer be verified. It is recommended to keep this safe somewhere");

cfg.uploader_key = key;
}
Expand Down

0 comments on commit 7065f51

Please sign in to comment.